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)
17 sword
.set_timefactor(1)
21 if K_UP
in w
.KEY
: sword
.rotation
[0]+=10
22 if K_DOWN
in w
.KEY
: sword
.rotation
[0]-=10
23 if K_LEFT
in w
.KEY
: sword
.rotation
[1]+=10
24 if K_RIGHT
in w
.KEY
: sword
.rotation
[1]-=10
25 if K_RSHIFT
in w
.KEY
: sword
.rotation
[2]+=10
26 if K_RCTRL
in w
.KEY
: sword
.rotation
[2]-=10
31 sword
.rotation
[0]/=1+0.50*t
32 sword
.rotation
[1]/=1+0.50*t
33 sword
.rotation
[2]/=1+0.50*t
38 w
.begin_loop(callbackround
=mainloop
)