parenting makes angle fail

Non-platform specific questions.

Postby Novice » Wed Dec 07, 2005 6:15 pm

if (tire.y<car.y-20) tire.y=car.y-20;
Try it out. Let me know if it works.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby ericdg » Wed Dec 07, 2005 7:29 pm

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.
ericdg
 
Posts: 53
Joined: Tue Nov 29, 2005 1:18 pm
Score: 1 Give a positive score

Postby Novice » Thu Dec 08, 2005 10:09 am

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.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby ericdg » Sun Dec 11, 2005 3:28 pm

Thanks alot. I'm starting to understand this now. That code worked well.
ericdg
 
Posts: 53
Joined: Tue Nov 29, 2005 1:18 pm
Score: 1 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest