Right, so I'm trying my best to write a simple driving game in XNA (that's not important). Basically, it's a 2D top down game, but I'm struggling to get the vehicle to move in the direction it is facing. Does anybody have a formula that would give me the new coordinates based on the source position, rotation, and the distance to travel? I did try:
X = distance * cos(rotation)
Y = distance * sin(rotation)
but I just ended up with a vehicle that would rotate around the point, and sometimes it might just travel in the direction it was facing :p
X = distance * cos(rotation)
Y = distance * sin(rotation)
but I just ended up with a vehicle that would rotate around the point, and sometimes it might just travel in the direction it was facing :p











- carpe noctem





