Hi, I’m trying to move the player character through a hatch, automatically, when clicking on it.
What’s the proper way to do it, considering I want to be able to “save” the position of the player, for when “loading”?
Thanks.
Hi, I’m trying to move the player character through a hatch, automatically, when clicking on it.
What’s the proper way to do it, considering I want to be able to “save” the position of the player, for when “loading”?
Thanks.
You can use Move Component To on the player’s capsule component, and save the player’s transform after the move completes. Upon loading, ensure to override the spawn location.
You can use Move Component To, but for interactions like hatches/doors/vents it’s usually cleaner to treat this as a small interaction sequence rather than directly moving the capsule.
What works well is:
For saving/loading, you don’t need anything special — just save the player’s transform after the interaction completes. On load, spawn/teleport the player to that saved transform.
This keeps the hatch responsible for “where the player ends up,” which makes level scripting much easier later.
Small tip: for interactions like this across a project, I usually attach a short checklist/note directly to the hatch Blueprint so I don’t forget things like “disable input,” “snap to exit transform,” “save player position,” etc. once the project gets bigger.
Thanks for the replies. What about using an Actor Sequence Component on the player character?
About “saving”, I meant it as saving the current position withing that moving sequence. So, if the save happens in the middle of moving the player from A to B, loading would restore that exact position and continue the movement. That’s why I’m asking about actor sequence component, because it’s easy to save the playback position and tell it to play from there, on load. It’s just a float.
Thanks for the replies. What about using an Actor Sequence Component on the player character?
About “saving”, I meant it as saving the current position withing that moving sequence. So, if the save happens in the middle of moving the player from A to B, loading would restore that exact position and continue the movement. That’s why I’m asking about actor sequence component, because it’s easy to save the playback position and tell it to play from there, on load. It’s just a float.
You can do it with an Actor Sequence, and you’re right that saving the playback time is convenient.
The problem is that you’re now tying player movement to a cinematic system rather than gameplay logic.
Sequences don’t care about:
They’ll happily keep “playing” even if the character is clipping through something or gets desynced.
A safer pattern is:
That float is what you save.
On load:
You get the same “resume from the middle” behavior, but it stays in gameplay space instead of cinematic space, so collisions, nav, and future changes won’t break it.
It also keeps the logic reusable for doors, vents, ladders, crawlspaces, etc., without needing a sequence per interaction.