Can anybody tell me why no matter how I change the plusses and minuses around, My car will still steer Left when I press right arrow and vice versa.
player_direction refers to the direction the car is facing
player_steer is the steering input amount.
player_speed = player_speed + ((GetRawKeyState(32) * 0.002)) - 0.001
if player_speed > 2 then player_speed = 0.2
if player_speed < 0 then player_speed = 0
if GetRawKeyState(37) = 1
player_steer = player_steer + 2
if GetRawKeyState(39) = 1
player_steer = player_steer - 2
if player_steer > 50 then player_steer = 50
if player_steer < -50 then player_steer = -50
if player_steer > 0 then player_steer = player_steer - 1
if player_steer < 0 then player_steer = player_steer + 1
player_direction = player_direction - player_steer
player_x = player_x + Cos(player_direction)*player_speed
player_z = player_z - Sin(player_direction)*player_speed
SetCameraPosition(1,player_x,player_y + 2,player_z)
SetCameraLookAt(1,player_x + Cos(player_direction),player_y + 1.25,player_z - Sin(player_direction),1)
I have been on it for an hour now.
Thank you for your help.