Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualJinixVomitorium

Posted 02 January 2013 - 04:07 AM

Its the same method. compare the left side of the car coordinates to the left side of the track coordinates, and the right side of the car coordinates to the right side of the track coordinates. As i said, the best way i can think of to map out the track coordinates is using calculus to find the curve x,y.

then when the condition that the curve coordinates equals the car coordinates, set the car x coordinates equal to the curve x coordinates - 1.

thae hardest part for you is calculating the coordinates of the track. search up some calculus equations.

 

if car.x <= track.left

{ car.x = track.left + 1}

if car.x >= track.right

{ car.x = track.right - (car.x + car.width) - 1 }


#1JinixVomitorium

Posted 02 January 2013 - 04:03 AM

Its the same method. compare the left side of the car coordinates to the left side of the track coordinates, and the right side of the car coordinates to the right side of the track coordinates. As i said, the best way i can think of to map out the track coordinates is using calculus to find the curve x,y.

then when the condition that the curve coordinates equals the car coordinates, set the car x coordinates equal to the curve x coordinates - 1.

thae hardest part for you is calculating the coordinates of the track. search up some calculus equations.


PARTNERS