How do I tip an Object onto the player?

Hi, I’m trying to tip an object (Coat Rack) onto the player.

I have the player transform and i was thinking that when the player enter box collision. A timeline would rotate the Coat Rack onto the player. That’s where I’m having a problem.

How to I translate the player transform to a fall down location?

Or am I doing it wrong?

Any help is appreciated, thank you. (Also yes the player is tiny)

Here what I have so far and also a bad drawing

Hey @ddave104!

You say you’re having a problem, and the code looks mostly there. You gave us a lot of good information… but you didn’t tell us what the problem is! :slight_smile:

So can you let us know what is happening versus what you want to happen?

Get back to us soon! :slight_smile:

The coatrack doesn’t fall down over the player head. It goes crazy. It’s not falling correctly.

Top View, the Coat Rack is the black, the player is the blue, I want the coat rack to fall on top of the player.

I know the player location. I know the Coat Rack location. I know I have to rotate the Coat Rack to the player location.

I don’t know how to do that.

How do I do that?

Hi! You’re actually very close — the main issue is how you’re determining the target rotation for the coat rack so it falls toward the player.

You don’t need to “translate the player transform into a fall location.” Instead, think of this as a rotation problem, not a position problem.


:white_check_mark: Recommended Approach (Rotate Toward Player)

When the player enters the trigger box:

  1. Get direction from Coat Rack → Player

    FVector Direction = (PlayerLocation - CoatRackLocation).GetSafeNormal();
    
  2. Convert that direction into a rotation

    FRotator TargetRotation = Direction.Rotation();
    
  3. Adjust the rotation so it tips over (not just faces the player)
    You likely want to rotate around one axis (Pitch or Roll depending on orientation), not fully rotate like a turret.

    For example:

    FRotator FallRotation = FRotator(TargetPitch, CurrentYaw, CurrentRoll);
    

    Or in Blueprint:

    • Break rotator

    • Only modify the axis that makes it “fall”

  4. Use Timeline (Lerp rotation)

    • Start rotation = initial upright rotation

    • End rotation = fall rotation

    • Use Lerp (Rotator) or RInterp To


:light_bulb: Simpler Trick (Often Better)

Instead of calculating full rotation from direction:

  • Just check which side the player is on (left/right/front/back)

  • Then apply a predefined fall rotation

Example:

if (Player is in front)
    → fall forward (Pitch +90)
else
    → fall backward (Pitch -90)

This is:

  • Easier to control

  • More predictable (important for gameplay)


:fire: Even Better Option (Physics)

If you want more natural behavior:

  • Enable Simulate Physics on the coat rack

  • When player enters trigger:

    AddImpulse / AddForce toward player
    

This gives a much more realistic “fall” without manually rotating.


:brain: Key Idea

You don’t move the coat rack to the player —
You rotate it so gravity (or animation) makes it fall toward the player.

Use physics or AddForce to push object toward player on overlap :grinning_face:

As someone said earlier:

You’re using “Set Transform”. You need to use “Set Rotation.” :slight_smile:
Use the “LookAt” node to get the rotation you need, rotate on Z for direction, then rotate on Y for the “Tip”. :slight_smile:
You can do this with multiple outputs in the timeline if you need to!

Also make sure the point you are rotating is the point on the ground closest to the player! Otherwise it’ll clip through the ground if you’re using the bottom center.

Attach pivot, enable physics, apply torque or impulse toward player :wink:

This is what I have so far

The base of the coatrack is falling in the right position now. But im now trying to slow down the fall. I mess with the time, value. Don’t know what im doing wrong.

Okay, this is a new way I haven’t seen before!

What does the inside of the timeline look like? And you can’t change the Interp Speed? Typically you would want to use a Lerp (Rotation) instead of an RInterpTo here.

simple timeline, ive tryed with lerp but the object just gets pulled down. Ive also mess with the time a value, nothing

So you’re plugging the 0-1 value from the timeline into… delta time. 0 means frozen in time, 1 means 1 second=1 second. Typically, you would use this setup with a LERP (Rotation) and plug this value into the Alpha value, then the starting rotation goes in A and the Ending rotation goes in B, with the output going to a Set World Rotation node.

You need to set both values as a variable first, though, or it will CONSTANTLY update the two inputs which would make it misbehave.

Give that a shot! :slight_smile:

Actually, I look at a timeline as like a mobile event tick. And you don’t even have to use float tracks. You just need a fast firing source for X seconds it can do it. A russian boy on Youtube figured out that you can set the length with 9 number 9s, and add a float track, two key frames, first one at time zero value zero, second one time 9 number 9s and value number 9s and out that float output comes a perfect milisecond timer.

There are set actor locations and transforms. But then there are add actor world offsets. In this case, the fast fire from your timeline could drive an add actor rotation. But I think the problem you will run into with this is the PIVOT POINT for the rack. I have done that before but I forget. There are tutorials out there for pivot point editing.

Then you will need a way to trigger it. Box collision overlaps? Proximity?

You are right about setting the values first, the coat rack is now falling in the right time and also on using lerp rotate. This is what I have.

But in slowing down a new problem showed up. The coat rack circles down, or goes back a little then falls.

I messed around a little with it and discovered that when I walk out of the box collision in a direction and remove the X axis from coatrack relative rotation (point A). It falls perfectly. I don’t know why and how to do it for all direction. Just the front and back of the coatrack. Remove X axis for front, Z axis for back for perfect fall.

Yep! That’s how it’s supposed to work!

Only change the values of the fall that you want. Use the original values from the coat rack’s rotation (you can break the rot value into x,y, and z by right clicking and choosing “Break”) to keep the old rotation for specific parts of the rotation, location… anything you need! You could even add or subtract to the original value before setting it.

Hope that helps you get it figured out!