How to make an object launch charater in a direction reletive to a rotating object?

I have made a rotating bar that i have given a collision box that launches the player away from it when it is touched. the launch direction is currently set to the x axis, i would like the direction to always be away from the rotating object relative to its position while rotating. can anyone help me with this please.

Well for this you will need the vector which does this. Since you did not provide your BP I will just assume things and mention them as I go on. Please correct me in case I assume something wrong.

So your collision box is (obviously) a box or a capsule or a sphere. In any case the center of that object should be in it’s center.

I assume you use the Hit event to trigger the launch which does already provide you with a hit location.

Now you only need the vector between those two vectors which would be “Hit location” - “Actor Location”.

With that you got the vector with an undefined distance. You can get one unit by getting the vector length (there is a simple node for that) and dividing the vector by that value (“vector / float” is an existing node as well).

Now that we have one unit of the vector we want you can simply multiply that by the force you want the player to bounce away and there you go.

A launch in the opposite direction of where the player hit the volume :slight_smile:

thankyou very much