Page 1 of 1

GetLocalPointVelocity() ?

Posted: Sun Sep 19, 2010 10:57 pm
by sfxman
Hello,

I was previously using PhysX and now trying to switch to bEPU.
One thing that is missing (perhaps) is a method to get the velocity of a point on an entity. PhysX does it with actor.GetLocalPointVelocity(positionInLocalSpace);
Is there something equivalent with Bepu? (Other than doing the maths with LinearVelocity and AngularVelocity)

Thanks!
--
Matt

Re: GetLocalPointVelocity() ?

Posted: Mon Sep 20, 2010 1:19 am
by Norbo
Toolbox.GetVelocityOfPoint is similar, but handles a world space point.

If the starting data is local space, you can use something like this too:

Code: Select all

Vector3 worldVelocity = entity.InternalLinearVelocity + Vector3.Cross(entity.InternalAngularVelocity, Vector3.TransformNormal(localSpacePoint, entity.InternalOrientationMatrix));

Re: GetLocalPointVelocity() ?

Posted: Mon Sep 20, 2010 1:53 am
by sfxman
Thanks :)

It would be nice if you could add the local equivalents for all of those things, it can be useful :)

--
Matt