Accessing a constraint's properties
Posted: Thu Jun 02, 2011 11:34 am
Hi,
I've got a very simple scene setup for testing and learning constraints. 2 cubes, one's kinematic, the other's dynamic; connected by a ballsocket joint.
This works as expected, but I cannot read the ballsocket's RelativeVelocity property using a "get" accessor.
If I add a "get" block of code, other parts of the code, that were working fine, pop up errors like crazy.
I'm obviously doing some thing(s) wrong. I've checked the obvious things, curly brackets, semi-colons, etc. I've tried placing the "get" in "Update" rather
than "LoadContent" and varied what's happening in the block of code inself,.. a lot.
I've been through the demo scenes and the "get"'s that I've found there are somewhat complex, so that just muddies the water, and the generic examples
at MS and other online C# sites aren't specific enough to really help, so here I am.
Hopefully someone can provide me with, or point me to, a simple, but specific example of accessing a constraint's properties.
My knowledge of C#, xna and Bepu are obviously limited, so please be gentle; you can chuckle, but no guffaws
Thanks,
Jeff
I've got a very simple scene setup for testing and learning constraints. 2 cubes, one's kinematic, the other's dynamic; connected by a ballsocket joint.
This works as expected, but I cannot read the ballsocket's RelativeVelocity property using a "get" accessor.
If I add a "get" block of code, other parts of the code, that were working fine, pop up errors like crazy.
I'm obviously doing some thing(s) wrong. I've checked the obvious things, curly brackets, semi-colons, etc. I've tried placing the "get" in "Update" rather
than "LoadContent" and varied what's happening in the block of code inself,.. a lot.
I've been through the demo scenes and the "get"'s that I've found there are somewhat complex, so that just muddies the water, and the generic examples
at MS and other online C# sites aren't specific enough to really help, so here I am.
Hopefully someone can provide me with, or point me to, a simple, but specific example of accessing a constraint's properties.
My knowledge of C#, xna and Bepu are obviously limited, so please be gentle; you can chuckle, but no guffaws
Thanks,
Jeff