I can set the value of the climbable step height as high as i want, it does not climb upon the cube in the center... is there a error in my logic, or is the command broken? It also seems to me that the movement of the character is stuttering somehow, but again i'm not sure if i dit something wrong.
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Adventure" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
SetCameraPosition(1,0,160,-200)
SetCameraRotation(1,30,0,0)
SetShadowMappingMode(3)
Create3DPhysicsWorld()
Obj_Player=700
CreateObjectBox(Obj_Player,25,72,25)
SetObjectColor(Obj_Player,150,100,0,255)
SetObjectPosition(Obj_Player,0,36,0)
FixObjectPivot(Obj_Player)
SetObjectCastShadow(Obj_Player,1)
characterOffsetVec = CreateVector3( 0.0, 36.0, 0.0 )
objectOrientationVec = CreateVector3( 0.0, 0.0, -1.0 )
Create3DPhysicsCharacterController( Obj_Player, 1, characterOffsetVec, objectOrientationVec, 0.75 )
Set3DPhysicsCharacterControllerStepHeight( Obj_Player,50 )
DeleteVector3( characterOffsetVec )
DeleteVector3( objectOrientationVec )
Obj_Level_1_1=2001
CreateObjectBox(Obj_Level_1_1,300,3,300)
SetObjectPosition(Obj_Level_1_1,0,-50,0)
Create3DPhysicsStaticBody( Obj_Level_1_1 )
SetObjectShapeBox(Obj_Level_1_1)
SetObjectColor(Obj_Level_1_1,150,150,150,255)
Obj_Level_1_2=2002
CreateObjectBox(Obj_Level_1_2,50,20,50)
SetObjectPosition(Obj_Level_1_2,0,-50,0)
Create3DPhysicsStaticBody( Obj_Level_1_2 )
SetObjectShapeBox(Obj_Level_1_2)
SetObjectColor(Obj_Level_1_2,150,150,150,255)
Player_Speed#= 60.0
Player_Turn#= 5.0
Player_Dir#=0.0
//Player_Move_FWD=0
//Player_Move_BWD=0
//Player_Turn_LT=0
//Player_Turn_RT=0
do
Move3DPhysicsCharacterController( Obj_Player, 0, Player_Speed# )
If GetRawKeyState(87)=1
Move3DPhysicsCharacterController( Obj_Player, 1, Player_Speed# )
//Player_Move_FWD=1
//Player_Move_BWD=0
endif
If GetRawKeyState(83)=1
Move3DPhysicsCharacterController( Obj_Player, 2, Player_Speed# )
//Player_Move_FWD=0
//Player_Move_BWD=1
endif
If GetRawKeyState(65)=1
Player_Dir#=Player_Dir#-Player_Turn#
Rotate3DPhysicsCharacterController( Obj_Player,Player_Dir#)
//Player_Turn_LT=1
//Player_Turn_RT=0
endif
If GetRawKeyState(68)=1
Player_Dir#=Player_Dir#+Player_Turn#
Rotate3DPhysicsCharacterController( Obj_Player,Player_Dir#)
//Player_Turn_LT=0
//Player_Turn_RT=1
endif
if GetRawKeyPressed( 32 )
Jump3DPhysicsCharacterController(Obj_Player)
endif
Rotate3DPhysicsCharacterController( Obj_Player,Player_Dir#)
Print( ScreenFPS() )
Step3DPhysicsWorld()
Sync()
loop