Child geom objects

Dec 6, 2009 at 7:33 AM

Can geom objects change dynamically or have child objects?  For example, I'm writing a space game and my space ship has a landing gear.  After I extend the landing gear, how do I add the geometry to the space ship's geom object so things can collide with my landing gear?

Thanks,

Mike

Coordinator
Dec 6, 2009 at 3:14 PM

If you use the SAT narrow phase controller, you can change the geometry on the fly. (You can also do it using the default narrow phase collider, but it requires some coding). My recommendation is that you create your space ship as a geometry and the landing gear as a separate geometry. When your space ship need to land, you activate the landing gear geometry so that it can register collisions with whatever it is landing on.

Dec 7, 2009 at 3:48 AM

I assume when I am creating the geom object for the landing gear that I need to pass the body object to the GeomFactory like I did when I created the main geom object.  How do I tell the body object where the landing gear geom is in relation to the main geom object?  Sorry if this is an elementary question.  I am a beginner with Farseer.

Thanks,

Mike