Models with multiple meshes

Started by
2 comments, last by Ouranos 21 years, 2 months ago
What''s the best way to implement such a model? For example, I have a ship that has guns that can change as you collect powerups. I want to be able to have the guns as seperate meshes that can be placed on the same position on the ship. I want the actual bullet/missle/laser/whatever to come out from these launchers instead of from some general location in front of the ship. Also, is there a way to have all these meshes in one file? ( I''m using Milkshape to do my modeling ) I would appreciate any words of wisdom. insert witty signature here
-------------------------http://www.roachpuppy.com
Advertisement
What you can do (and what I''d do) is create a dynamic templated linked list and assign meshList a property of your main model:

  class CShip : public CMesh{......CList <CMesh *> m_meshes;...};  


If you need such a list, I suggest you look into std::vector class or I can send you my own linked list similar to std::vector but with more functions in it and more flexibility.

" Do we need us? "


Ionware Productions - Games and Game Tools Development

I know of ways that I can store the model but I''d like to know how the meshes interact, like how would it know where to put the guns on the ship. Another good example is models in quake3 or any relatively new fps. There''s usually the player model and this model can hold different weapons. You can probably uses bones to do it but is there another way? Using bones on a ship model with no animation just doesnt sound practical, although I may be wrong.

insert witty signature here
-------------------------http://www.roachpuppy.com
Just supply a local coordinate where you want to be able to "attach" stuff, then extract the local coordinate from file, transform the matrix, render attached mech. voila, custom mesh attached to another model.

-Luctus
Codito, Ergo Sum (Courtesy of ThinkGeek)

[Mail][DreggSoft][Fileformat Guide][n00bs]
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

This topic is closed to new replies.

Advertisement