Further now, I'm experiencing some difficulty that I need some advice.
As the game is 1st person view and basically linear movement - forward, back, left 90 right 90 degree I tried using the camera as movement control, this worked to the stage of object collision (where i just kept walking through walls)
Not I have used an object for the collision, which now has been hidden but works a treat for camera & collision.
Now the snag - I tried re-doing the code to turn 90 degree in the loop that worked with the camera but there is no fluent movement anymore. Can someone please explain where I went wrong?
If Leftkey()=1
leftrotate = 1
repeat
leftrotate = leftrotate + 3 `'3' rotation speed
if leftrotate >90 then leftrotate = 90 `keeping perfect 90 degree angle
Yrotate object 2,Wrapvalue(aY#-leftrotate)
`Detect collision unneeded
`If Object collision(2,0)>0 then position object 2,X#,0,Z#
X# = Object position x(2)
Z# = Object position z(2)
`New camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
`Position camera
Position Camera cX#,200,cZ#
`Point the camera object
Point camera X#,200,Z#
Sync
wait 2
until leftrotate = 90
endif
I know the codes 'rough' but i'm still working on getting it to work