GetLocalPointVelocity() ?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
sfxman
Posts: 15
Joined: Sat Sep 18, 2010 1:28 am

GetLocalPointVelocity() ?

Post 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
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: GetLocalPointVelocity() ?

Post 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));
sfxman
Posts: 15
Joined: Sat Sep 18, 2010 1:28 am

Re: GetLocalPointVelocity() ?

Post by sfxman »

Thanks :)

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

--
Matt
Post Reply