No matter what i try the whole physics stops responding after a few seconds of running,least for me it does!
I have wrote a small piece of code here:
// Project: physicstest
// Created: 2016-05-22
// set window properties
SetWindowTitle( "physicstest" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
Create3DPhysicsWorld(10)
set3DPhysicsGravity(0,-3,0)
#constant KEY_SPACE = 32
player=1
ground=2
createobjectbox(player,1,1,1)
setobjectcolor(player,255,0,0,255)
setobjectposition(player,0,1,0)
set_physics(player,2,2)
createobjectbox(ground,20,1,20)
set_physics(ground,1,2)
Repeat
if getrawkeypressed(KEY_SPACE)
SetObject3DPhysicslinearVelocity( player, 0, 1, 0,10)
endif
Print( ScreenFPS() )
Step3DPhysicsWorld()
Sync()
Until GetPointerPressed()
function set_physics(objectnumber,phb,phs)
select phb
case 1
Create3DPhysicsstaticBody(objectnumber)
endcase
case 2
Create3DPhysicsdynamicBody(objectnumber)
endcase
endselect
select phs
case 2
SetObjectShapebox(objectnumber)
endcase
case 1
SetObjectShapeSphere(objectnumber)
endcase
endselect
endfunction
If you run it and press space straight away then it jumps and fine, yet wait a few seconds and it fails, even if you jump straight away then wait a few seconds it simply wont jump, everything freezes physics wise, no matter what i put in the initial physics settings also!
Hail to the king, baby!