How to cancel velocity of an object on a specific axe and point?

Hi !

I’m looking to cancel velocity of an object on a specific axe and point. I know it may be difficult to represent what i want to do, so i made high level graphics to explain a little bit.

Suppose, I have a box with physics and I can apply force to it, in any direction.

190225-bp_1.png

Now, I want to lock a specific point on the vertical axis (axis of the object, not the world, so it may move with the object)

190226-bp_2.png

So I can move to the right direction (aka, the horizontal axis of the object)

190227-bp_05.png

I can rotate around the specific point

190228-bp_4.png

But I can’t move like this because, the velocity of the point is not vertically null

190229-bp_3.png

Do you know how to make such comportment ?

I tried this :

myMesh->AddImpulseAtLocation(-myMesh->GetBodyInstance()->GetUnrealWorldVelocityAtPoint(myPoint), myPoint);

But it doesn’t work, the block is slow down at this point, but not blocked… (I should have project the vector of the velocity to my axe, but that was just a test)

Thank you !