I'm working on a more complex CompoundBody where to be able to do a couple things.
I need to be able to kind of control where the point of rotation is, which appeared to be based on the centerPosition. I'm finding out this centerPosition by design is not made to be controlled. This body has been constrained to the z-axis for rotation and translation. I still need to ensure the rotations all happen around a fixed point.
I have several sub-bodies which I'm adding to a compound body. Its been working out fine as every sub body I've added has essentially the same centerPosition. Now i'm going back to better approximate this collision body against its actual graphical model.
I've tried a couple things with no luck. I've tried accessing this centerPosition properties and setting after all sub bodies are created which doesn't appear to how this was designed to be used. It appears that this gets calcuated upon adding other entities, based on this I've stopped messing with this.
Based on this forum http://www.bepu-games.com/forums/viewto ... sets#p5030, I've tried to mess with the subBodyLocalOffsets, but I don't think this will get me what I need either. Seems like I may have to dive into a new type of RotationAxisConstraint which I have been messing with now.
Any thoughts?
Controlling the Rotation Point on a Complex CompoundBody
-
- Posts: 6
- Joined: Thu Dec 10, 2009 4:08 pm
Re: Controlling the Rotation Point on a Complex CompoundBody
Entities actually rotate around their center of mass. By default, the centerOfMass property coincides with the center position (the center position is the 'center of geometry,' with some exceptions for compound bodies with individual subbody center of mass offsets).
You can offset the center of mass of your CompoundBody by either setting its centerOfMass/internalCenterOfMass properties or setting the centerOfMassOffset property (which would probably be easier).
You can offset the center of mass of your CompoundBody by either setting its centerOfMass/internalCenterOfMass properties or setting the centerOfMassOffset property (which would probably be easier).
-
- Posts: 6
- Joined: Thu Dec 10, 2009 4:08 pm
Re: Controlling the Rotation Point on a Complex CompoundBody
Thanks for the help, was able to figure it out based on your info.