Page 2 of 2

PostPosted: Wed Dec 07, 2005 6:15 pm
by Novice
if (tire.y<car.y-20) tire.y=car.y-20;
Try it out. Let me know if it works.

PostPosted: Wed Dec 07, 2005 7:29 pm
by ericdg
I tried it and it didn't seem to do anything.

If I come to the edge of a cliff and one tire goes off, that tires drops and the other stays put and the whole car falls to pieces.

PostPosted: Thu Dec 08, 2005 10:09 am
by Novice
Did you put the lower limit?
if (tire.y<car.y-20) tire.y=car.y-20; is the uper limit
if (tire.y>car.y+20) tire.y=car.y+20; this is the lower limit.

If my animation has 8 frames, then does the 8 frames need to rotate all 360 degrees, or is there a way to limit it?


You can limit it the same way. Ex.
Code: Select all
if (angle>120) angle=120;
else if (angle <80) angle=80;
I think that should do the trick with a litle bit adjusting.

PostPosted: Sun Dec 11, 2005 3:28 pm
by ericdg
Thanks alot. I'm starting to understand this now. That code worked well.