3 sys
.path
.insert(0, os
.path
.abspath(os
.path
.join(os
.getcwd(), '..', 'src')))
5 import pyworlds
.worlds
as w
6 from pyworlds
.basics
.body
import *
7 from soya
.sdlconst
import *
11 sword
= PhysicsBody(mesh_file
="sword")
13 sword
.rotation
[1]=90.0
14 sword
.rotation
[0]=17.0
16 w
.camera
.set_xyz(0,0,5)
25 if K_UP
in w
.KEY
: sword
.rotation
[0]+=200*t
26 if K_DOWN
in w
.KEY
: sword
.rotation
[0]-=200*t
27 if K_LEFT
in w
.KEY
: sword
.rotation
[1]+=200*t
28 if K_RIGHT
in w
.KEY
: sword
.rotation
[1]-=200*t
29 if K_RSHIFT
in w
.KEY
: sword
.rotation
[2]+=200*t
30 if K_RCTRL
in w
.KEY
: sword
.rotation
[2]-=200*t
32 sword
.rotation
[0]/=1+0.50*t
33 sword
.rotation
[1]/=1+0.50*t
34 sword
.rotation
[2]/=1+0.50*t