nah, that's a bug. it should simply stop if vel = 0,0,0 (and i tested 0 and <> 0 for initial speed) and gravity should do its thing.
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetScissor(0, 0, 0, 0)
Create3DPhysicsWorld()
box = CreateObjectBox(10, 10, 10)
Create3DPhysicsDynamicBody(box)
SetObject3DPhysicsCanSleep( box, 0 )
ground = CreateObjectBox(100,10,100)
SetObjectPosition(ground,0,-20,0)
Create3DPhysicsStaticBody(ground)
SetCameraPosition(1, 0, 0, 80)
SetCameraLookAt(1, 0, 0, 0, 0)
FixCameraToObject(1,box)
do
If GetPointerPressed()
Select Test
Case 0:
SetObject3DPhysicsLinearVelocity(box,0,0,0,0)
INC Test
EndCase
Case 1:
Delete3DPhysicsBody(box)
INC Test
EndCase
Case 2:
Create3DPhysicsDynamicBody(box)
INC Test
EndCase
Case 3:
Reset3DPhysicsWorld()
SetCameraPosition(1, 0, 0, 80)
SetCameraLookAt(1, 0, 0, 0, 0)
FixCameraToObject(1,0)
DeleteObject(box) //rem me
INC Test
EndCase
Case 4:
CreateObjectBox(box, 10, 10, 10)
Create3DPhysicsDynamicBody(box) //rem me
ground = CreateObjectBox(100,10,100)
SetObjectPosition(ground,0,-20,0)
Create3DPhysicsStaticBody(ground)
SetCameraPosition(1, 0, 0, 80)
SetCameraLookAt(1, 0, 0, 0, 0)
FixCameraToObject(1,box)
Test = 0
EndCase
EndSelect
EndIf
Print(GetObjectExists(box))
Print("Test:" + STR(Test))
Print("Vel:" + STR(GetObject3DPhysicsLinearVelocityY(box)))
Print("Y:" + STR(GetObjectY(box)))
Print("PhysObjs:" + STR(Get3DPhysicsTotalObjects()))
Step3DPhysicsWorld()
Sync()
loop
play with the 2 "rem me" lines, as well. what do you make of
-nan(ind) ?
and same occurs with SetObject3DPhysics
AngularVelocity(Obj,0,0,0,0).
btw, the fixcamera was part of me trying to follow the object into oblivion (i had the skybox active, etc).
meanwhile,
bug posted.
just tried replacing case 1: with SetObject3DPhysicsLinearVelocity(box,10,0,10,0) and it generates yvelocity (which caps at -1200.0).