I'm trying to implement a simple little bike racing minigame in my current project, and obviously the bike being able to lean is a big thing, however, no matter what I try I get an odd effect that I can't manage to fix. If you try the following code it seems as if it is being rotated globally rather than locally:
sync on : sync rate 60
autocam off
color backdrop rgb(255,0,255)
yRot = 0;
zRot = 0;
color object 1, rgb(255,0,255)
make object plane 2, 400, 400
rotate object 2, 90, 0, 0
loop object 1
do
if leftkey()
dec yRot, 2
zRot = curvevalue(-85, zRot, 35)
else
if rightkey()
inc yRot, 2
zRot = curvevalue(85, zRot, 35)
else
zRot = curvevalue(0, zRot, 35)
endif
endif
yRotate object 1, yRot
zrotate object 1, zRot
position camera object position x(1), object position y(1)+2, object position z(1)
rotate camera object angle x(1), object angle y(1), object angle z(1)
move camera 5
point camera object position x(1), object position y(1), object position z(1)
sync
loop
I have no idea why it does this so any help would be greatly appreciated (again lol

) so thanks in advance.
EDIT:
Also, I don't want to use the roll object functions as I can't control the exact value the roll to as easily as I can with angles.
BASIC programmers never die, they GOSUB and don't RETURN.