Milti axes spring Joint & get orientation question.

DarkCoder

02-05-2006 14:51:41

Hey all,

Ive just run into a problem, not so much a problem but is there an easier way to do it.
What i want is a joint that can rotate on 2 axes, but to also be affected by spring force.

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 Motion Blur bit showing off the the plants :)

My problem is atm i am making 2 revoluteJoint's with a setSpring jointDescription.
Only each leaf will have 3-4 joints, making 6-8 per leaf.

And this is going up in number by each plant with # leaves on it in a dense area!

Anyway to achieve this affect with just 1 joint instead of 2?

Also is there an easy way to grab a joints x,y & z orientation using a get* command inside Nxogre??

Code example would be great!

Thanks

betajaen

07-05-2006 19:42:58

I should of answered this a few days ago, but:

Could you just use - Spherical joints on each base of the leave (of the main branch of the plant), and to limit the movement just use a limit as well as linear and angular dampening.

And for a X,Y,Z for a NxJoint? I'm not sure, I don't have the SDK handy, but I know it's not in NxOgre.

DarkCoder

07-05-2006 20:46:00

OK,
That should work.

I am using OgreNewt as well & have achieved what i wanted in newton now.
Shouldn't be hard to do it in Nx aswell.

The getting orientation was so i could attach a model with a skeleton & have the skeleton follow the joints orientations.

betajaen

07-05-2006 21:19:33

Then you have the answer ;)

Getting the joint position should be too hard, even if you have to get it from the body position and work from that.