Basically, the "phy set gravity x, y, z" command isn't working on my character controller, no matter what I set it to the character controller always falls at the same rate. Any help would be great =)
here's my source:
rem | Global Vars
PlayerSpeed = 12
CanJump = 1
CanJumpB = 1
GravitStr = 200
Sensitivity# = 0.5
PlayerJumpVelocity = 0
CameraAngleX# = 0
CameraAngleY# = 0
CameraAngleZ# = 0
set display mode 1280, 1024, 32
SET WINDOW OFF
rem | Start physics
phy start
rem | Get load options
input "Please enter a map filename to load: ";map$
input "Please enter map scale: ";cScale$
scale = val(cScale$)
input "Please enter X pos:"; cX$
mX = val(cX$)
input "Please enter Y pos:"; cY$
mY = val(cY$)
input "Please enter Z pos:"; cZ$
mZ = val(cZ$)
rem | loads map
load object map$, 1, : scale object 1, scale, scale, scale : position object 1, mX, mY, mZ : phy make rigid body static mesh 1
rem | make player object
make object sphere 2, 50 : position object 2, 0, 100, 20 : hide object 2 : phy make capsule character controller 2, 0, 100, 20, 25, 25, 1, 30, 20
rem | load player gun
`load object "HandGun.x", 3 : set object collision off 3
rem | Make camera
make camera 1 : set current camera 1 : position camera 1, (object position x(2)), (object position y (2))+20, (object position z (2)) : set camera range 1, 1, 15000
rem | Set ambient lighting
set ambient light 200
rem | Hides mouse, disables system keys etc.
hide mouse
disable systemkeys
phy set gravity 0, -200, 0
sync on
sync rate 60
do
text 0, 0, str$(screen fps())
inc CameraAngleX#, mousemovey()
inc CameraAngleY#, mousemovex()
position camera 1, (object position x(2)), (object position y (2))+20, (object position z (2))
rotate camera 1, CameraAngleX#, CameraAngleY#, 0
rotate object 2, 0, CameraAngleY#, 0
if upkey()
phy move character controller 2, 250.0
else
phy move character controller 2, 0.0
endif
phy update
if escapekey() then exit
sync
loop