#### Archived

This topic is now archived and is closed to further replies.

# rotating parts around a common point?

This topic is 5953 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i have a car, my modeler made it into 15 parts so each one can be damaged individually. i need to know how to rotate and move all the parts so they ''stay together'' without going out of sync. i know how to render them without breaking them apart, but not do physics on it (the tires only need the physcis) how would i go about that?

##### Share on other sites
sorry accidental double post.

[edited by - SysOp_1101 on July 29, 2002 10:33:30 PM]

##### Share on other sites
Why not just have a single matrix that each part of the car contains a reference to? Then you could just rotate/translate each part of the car by the common matrix.

Just a stab in the dark. HTH

##### Share on other sites
Gosh, billybob you''ve been asking a lot of questions. that''s a good thing though, don''t get me wrong. :-)

About the q, are the 15 parts touching? (ie: windshield and frame) or are they seperate? (ie: tire and frame). What are the 15 parts? If they''re touching, you can''t get away with just transforming them. BTW, use a frame-based setup for the car, it makes everything easier. Anyways, if they are touching, you have to a bit of math to calculate what should happen. If i were u, I''d setup control points along the car. Then before you render, adjust the vertices (probly in a vshader doing math like would bones) so that they fit the control points. If the control poitns move, the vertices should move to adjust it. That way you can life up the hood or whatever else based on the physics from the crash.

Many companies that make car games don''t do this though. They may create 15 different car frames of the different crashes and positions with one set of tires and stuff and just render the car frame differently based on the crash. That way is a lot faster although it stores more memory if that''s an issue for u.

---
My Site

##### Share on other sites
Just for my own edification, why would transforming the parts if they were touching be such an imposibility?

##### Share on other sites
quote:
Just for my own edification, why would transforming the parts if they were touching be such an imposibility?

By transforming, I meant rotating, scaling, and translating them. It would be VERY difficult is not impossible in some situations. The reason is because lets say you rotate the windshield on the y axis. Well no there''s a hugh, noticibly gap between the frame and windsield and not to mention that it isn''t realistic at all. Yea, you can do it but it wouldn''t be realistic and would have large ugly unrealistic gaps.

---
My Site

##### Share on other sites
quote:
Original post by RapidStunna
Gosh, billybob you''ve been asking a lot of questions. that''s a good thing though, don''t get me wrong. :-)

About the q, are the 15 parts touching? (ie: windshield and frame) or are they seperate? (ie: tire and frame). What are the 15 parts? If they''re touching, you can''t get away with just transforming them. BTW, use a frame-based setup for the car, it makes everything easier. Anyways, if they are touching, you have to a bit of math to calculate what should happen. If i were u, I''d setup control points along the car. Then before you render, adjust the vertices (probly in a vshader doing math like would bones) so that they fit the control points. If the control poitns move, the vertices should move to adjust it. That way you can life up the hood or whatever else based on the physics from the crash.

Many companies that make car games don''t do this though. They may create 15 different car frames of the different crashes and positions with one set of tires and stuff and just render the car frame differently based on the crash. That way is a lot faster although it stores more memory if that''s an issue for u.

---
My Site

i know, and i get a lot of answers

one thing i''m doing, all the parts(exludign the tires) never need to move independantley of the main body(what all my physics crap gets done to). the only thing that can move are the tires, and even then they are only moving in one axis. so what i had my friend do is export all the parts as different.x files but making ABSOLUTLEY sure that he kept the origin EXACLTY where it was reletive to the body. that way, when i rotate, they rotate together. its only the tires that i need help with.

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 13
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633317
• Total Posts
3011336
• ### Who's Online (See full list)

There are no registered users currently online

×