How to use UE4's gravity without it being a playable character?

Meaning you want to use launch character, event on landed, etc etc. But its not a playable character and will never receive an input.

Hey there @usa423! Since those functions specifically are built for pawns, you’d still have to have a pawn to use them. However, since you don’t really need the rest of the pawn features like possession/input etc. You could just have a physics enabled object and use Add Impulse or Add Impulse At Location to launch a physics object, and just handle the collision check for when it lands with On Hit or On ActorBeginOverlap (if more of a trigger) nodes and just check what it hit.

Some of the nodes you could use:

An example of how to check if the actor it lands on/hits has a tag, in this case I’m checking for Ground:

1 Like

Hey there SE, thx for the suggestions! I am using an actor with a cube and the actor has a tag “land”. I am thinking I may just have to end up using a line trace under everything and just have a constant negative Z on objects (add actor world offset?) unless they are hitting “land”. I notice on many old platformers that even energy or dropped items could land on moving platforms and ride along easily.

So you are saying use a pawn, and just add a cube and enable physics on the cube? But it would have to be the root of the pawn wouldn’t it? If not it could still pull everything else down?

Depending on your use case physics may work if your “moving platforms” are physics based (like a boat), then I’d recommend the impulse and hit/overlap checks, and yes the root of the actor would need to be a mesh to handle the physics. Otherwise, you could handle the movement yourself like you mentioned with a downward check, which would give you more control but be more effort to put together.

What’s your full use case?