Hello I am trying to make a general starting place for my progam / game and am haveing problems with the character controller not being able to turn. I think that i have read that you cannot use turn object once you start useing physx because all control is passed to physX. well here is the code that i have.
REM Project: Vnet
REM Created: 5/22/2007 11:37:17 PM
rem Set-Up Display ------------------------
if check display mode(1024,768,32)=1 rem --
set display mode 1024,768,32 rem ---------
endif rem ---------------------------------
` call this command to be able to use physics in our program
phy start
` turn sync rate on
sync on
sync rate 60
xrotation = 1
` make a box that will be our ground and texute it as grass
load image "Image\grass.jpg",1
make object box 1, 1000, 1, 1000
position object 1,500,0,500
texture object 1,1
scale object texture 1,100,100
Set object texture 1,1,1
` create a static rigid body box to represent the ground
phy make rigid body static box 1
`Create Surrounding wall (barricade off the edge of the world)
make object box 2,1,50,1000
make object box 3,1,50,1000
make object box 4,1000,50,1
make object box 5,1000,50,1
position object 2,1000,25,500
position object 3,0,25,500
position object 4,500,25,1000
position object 5,500,25,0
` Make the world wall solid with physX
for i = 2 to 5
phy make rigid body static box i
next i
` Texture your wall and scale texture to look decent
load image "Image\brick.bmp",2
for i = 2 to 5
texture object i,2
Scale object texture i,100,10
next i
` Make player object
`
`
make object cube 6, 21
position object 6, 500, 30, 400
phy make box character controller 6, 500, 30, 400, 21, 21, 21, 1, 1.5, 45
make object cube 7,5
position object 7,500,25,500
phy make rigid body dynamic box 7
`---------- Main Loop -------------------
do
gosub framerate_display
gosub user_control
phy update
sync
loop
end
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`-----------------------------------------------------------------------
user_control:
position camera object position x ( 6 ), object position y ( 6 ), object position z ( 6 )
rotate camera object angle x ( 6 ), object angle y ( 6 ), object angle z ( 6 )
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = wrapvalue ( CameraAngleY# + mousemovex ( ) * 0.4 )
CameraAngleX# = wrapvalue ( CameraAngleX# + mousemovey ( ) * 0.4 )
yrotate object 6, curveangle ( CameraAngleY#, OldCamAngleY#, 24 )
xrotate object 6, curveangle ( CameraAngleX#, OldCamAngleX#, 24 )
key = 0
if upkey ( )
key = 1
phy move character controller 6, 20.0
endif
if downkey ( )
key = 1
phy move character controller 6, -20.0
endif
if leftkey ( )
key = 1
turn object left 6, 1.0
endif
if rightkey ( )
key = 1
turn object right 6, 1.0
endif
if key = 0
endif
return
`-----------------------------------------------------------------------
`=======================================================================
framerate_display:
text 20,screen height()-40,desc$
fps$="DBPro Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$
return
`=======================================================================
My problems are with turning in the User_Control Subroutine.
Thank you for all your help in advance.
Here I am But am not here, there you are not really there.