Setting Geometry after instantiation

Topics: User Forum
Mar 11, 2007 at 8:56 PM
Hello All,

I've run into a stumbling block. I'm trying to set the geometry on a rigid body after it has been instantiated. I am trying to do this because I'm reading the information about the object I am instantiating from an XML file (part of level loading).

I haven't figured out a good way to set the geometry (I believe it's a read only property).

I feel like I'm missing something simple but not sure.

Thanks!
Coordinator
Mar 11, 2007 at 11:33 PM
Geometry should be read/write on the RigidBody. What exactly are you having trouble with?
Mar 12, 2007 at 6:21 PM
Ah, I think I see it. I just looked at the setter method for RigidBody:
set { 
    _geometry = value;
    _geometry.Update(Position, Orientation);
}

At this point Position and Orientation are not set and it goes off whatever the defaults are.

Sometimes you find the answer after asking a dumb question. Thanks :)