Movable mesh subsections, flags in meshes.

Started by
2 comments, last by d000hg 19 years, 9 months ago
So I have cars to use in my game, and obviously they need wheels which turn. Currently I have a chassis model and a wheel model, which I've found good positions to locate at on the chassis. This seems a little cumbersome so can I either: a)Have part of a mesh which has another rotation matrix as well as the model's main world matrix, so that part of the matrix can be turned/moved b)Somehow put 'flag' points in the mesh/.x file to tell me 'This is where the wheels go'? I'll end up having a script for each car for mass etc so could just put the wheel positions here but I wondered what the capabilities of the .x file is in this area (I'm using the D3DX mesh loading mechanism).
Advertisement
have you looked into scene graphs? I am currently working on a design for my first scene graph, so I don't have all the answers, but it may be just the thing you need.

Gamedev.net Scene Graph article
Doesn't the .X file format support hierarchical frames? If so, then just make the wheels children of the car, and everything will work swimmingly.
That may be what I want. Although if I want the option to change your tyres/wheels for the car maybe using a script would be easier?

This topic is closed to new replies.

Advertisement