Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Im working on my first project using OpenSceneGraph. The project is a model flight simulator for one of my university courses,

I want to be able to load airplanes (consisting of multiple models) and then depending on what plane the user/users choose a new airplane (entity) is created that a user controls.

A loaded airplane will have the following structure. Main body and then the rudders/propellers translated using translation nodes to there right positions. There also needs to be a translation node for each of the rudders/propellers used to rotate the rudders depending on player input.

My problem is i dont know how i should structure it so that i dont need to load the whole model once for every instance of the same type of airplane or store the model parts of the airplanes multiple time.

The only thing that needs to be hard copied is the translation nodes so that the different instances of the same airplane can have rudders and things modified separetely from other planes.

If the planes would consist of only one model i would just create a entity class containing a translation node and add the model to that node so that all entities share the same model, but now the planes are more complex so i dont know how i should do it.

So if someone could give me a hint or a suggestion for further read i would appreciate it.

I hope someone understood what i was trying to describe.

Thanks for answers

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.