Character falling off fast moving platform

I’ve been searching for a solution to my character either falling through or being flung off a fast moving platform.

The platform uses a timeline with a float from 0 to 1 and 0 to 1. It moves between point1 and point2 using a Lerp and the timeline’s float. The Vector Lerp is connected to SetWorldLocation. (Ignore the other random wires)

This works fine with my character standing on it at slow speeds, but I need this to go FAST. Unfortunately, this causes the player to either get flung off, shot into the air, or fall through the platform.

I’ve tried AttachToComponent to attach the player’s capsule component to the platform, but the platform continues to move the character in addition to the parent’s added movement. Basically it’s like the movement of the platform is added twice.

Any help much appreciated.

As a temporary solution I discovered AttachToComponent and Disable Movement (on character) lets it work as desired. But ideally I would like to move around the platform while it’s moving.

Well I could. It’s not difficult to toggle the collision once the platform starts, but you would still have the character being flung around.

It seems that the best solution for now is to temporarily disable the character’s ability to move and parent that to the moving platform. But I would really like to be able to move around

No, that’s just the only solution I could find to keep the player from falling off the platform.

I have a moving platform going from point A to point B. The platform is moving fast and throws the player off.

How would you make the character move relative to the platform rather than relative to the world?

I found this in the Unity forums, but I’m not sure how to translate it to blueprint.

Answer by superventure · Nov 05, 2011 at 07:37 PM
Can’t you make the player a child to the platform with On trigger stay/exit events? That way the player will move, rotate, etc with the platforms movements AND speed, while still having their own controls.

function OnTriggerStay(other:Collider){

         if(other.gameObject.tag == "platform"){
         transform.parent = other.transform;

     }
 }

function OnTriggerExit(other:Collider){
if(other.gameObject.tag == “platform”){
transform.parent = null;

     }
 }    

You can try to place blocking volumes around the edges of the platform, maybe?

I don’t understand. You want the character locked down and moving at the same time?

This is the solution I came up with in case anyone else in the future runs into a similar issue.

I have it set up so the “begin” comment section runs right before the platform starts to move. When it’s done moving, the “End” is activated.

The only drawback is that the player character can’t move around while the platform is transporting them. In the future I’d still like to find a solution for this.