for some reason my sphere totally vanishes, too out the ready condition
So I have this
function player_control()
sx2#=GetObject3DPhysicslinearVelocityX(player)
sy2#=GetObject3DPhysicslinearVelocityY(player)
sz2#=GetObject3DPhysicslinearVelocityZ(player)
//print (""+str(sz2#))
mvz#=getrawkeystate(38)-getrawkeystate(40)
mvx#=getrawkeystate(39)-getrawkeystate(37)
inc sx2#,mvx#*10
inc sz2#,mvz#*10
//if mb=1
// inc sy#,10.0
//endif
spd#=sqrt((sx2#*sx2#)+(sy2#*sy2#)+(sz2#*sz2#))
if spd#>100.0 then spd#=100.0
SetObject3DPhysicslinearVelocity(player,sx2#,sy2#,sz2#,spd#)
endfunction
that is called from this function:
function test_level()
for n=1 to maxobjects
if object[n].id>0
set_physics(object[n].id,object[n].pb,object[n].ps)
endif
if object[n].gr=1
player=object[n].id
//SetObject3DPhysicsCanSleep(player,0)
endif
next n
create_my_text(2000,308,40,25,0,255,0,"Level Running.. Press E to Exit ",0)
repeat
//SetObject3DPhysicslinearVelocity( player, 0, 0, 0, 0 )
if getrawkeypressed(KEY_E)
quit=1
endif
player_control()
Step3DPhysicsWorld()
sync()
until quit=1
deletetext(2000)
quit=0
clear_physics()
reset_object_positions()
endfunction
as you see the line I have not indented!
yet immediately the sphere vanishes
if i rem out the line
SetObject3DPhysicslinearVelocity(player,sx2#,sy2#,sz2#,spd#)
it is of course there but cant move!
Hail to the king, baby!