- Home /
How to pause an object temporarily
I'm trying to set up an event system in a pinball-style game where hitting a switch opens a gate. When this happens I'd like to stop the pinball, move the camera to the gate, show the gate open, then come back to the pinball and resume action as though nothing has happened.
Basically I want to pause the movement of one object in the game temporarily without change its velocity or anything so upon unpausing it resumes its course.
Any thoughts on what I'd do to accomplish this?
Answer by Eno-Khaon · Nov 19, 2021 at 06:45 AM
One way to approach this is to take note of any mobile objects (pinball, etc.), store their velocity and angularVelocity, then make the Rigidbodies kinematic while you show a cutscene, as it were.
Then, when it's done, go back through all those mobile objects, make them non-kinematic, then set their velocity and angularvelocity back to those stored values.
Your answer
Follow this Question
Related Questions
2D metroid boost ball 0 Answers
Adding a velocity to a rigid body inst working. 1 Answer
Can I make an animation while game is paused? 3 Answers
Unpausing While Keeping Values 0 Answers
Weird velocities (bug?) when moving character in unity 2D, 1 Answer