Milti axes spring Joint.

DarkCoder

02-05-2006 18:55:14

Hey all,

What i want is a joint that can rotate on 2/3 axes, but to also be affected by spring forces.
To push/pull them back to there starting angles, but not past say 45d in either direction.

Imagine a big leaf on a jungle plant, like the CRYTEK 2 engine plants.
Download CRYTEK 2 tech demo: http://uk.media.pc.gamespy.com/media/69 ... ids_1.html (the bit showing off the the plants :)

There will be around 3-4 of these joints per big leaf, and 4-6 leafs on a plant with a small number of plants.
What type of joint would best suit this type of simulation using ogrenewt?
And how would i go about making it in ogrenewt.

Atm im thinking some kind of joint callback to implement a spring force & limits. Any better way?

Code example would be great!

Thanks

DarkCoder

06-05-2006 02:12:08

My first idea of using BallAndSocket in combination with setlimits & custom callback seems to be working well.
Think i will post a demo with a boned plant mesh when ive got it looking good for people wanting to make the same effect.

Any other ideas into how it could be done are welcome.