I am trying to implement a object/box pushing mechanic in a 3d third person game, similar to (early) Resident Evil, Alone in The Dark etc.
So, there would be no troublesome physics involved, just move the object in sync with the player's "push" animation (and in the same direction).
An idea would be to have four triggers at each edge of the box that detect the edge that the player is in, then use an object transform action to move the box a certain amount in the corresponding axis. I would also need extra triggers for detecting if there is a collider behind that direction - if there is, don't move the box.
Is there an easier way though? My idea seems a bit messy.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Triggers to detect the Player's relative position are probably your best bet, but you can use the Physics: Raycast Action from the box in the push direction to check if there's room for it to move.