How can I completely freeze a puppet in place?
I'm making a system where the player can interact with objects in the environment to bring up dialogue boxes and other stuff about them. Whenever dialogue boxes are up I don't want the player to be able to move the puppet at all, so any time this happens a wireless transmitter broadcasts an immobilise signal... but I'm finding actually stopping the puppet more difficult than I was expecting. I've tried a few things and none have worked:
- routing the inputs for walking/jumping through an AND gate connected to a NOT gate for the Immobilise tag *mostly* works, but sometimes causes odd directional problems when moving the puppet, likely because of the constant powered on signal from the NOT gate.
- setting the puppet to immovable via the physics section of its tweak menu whenever it senses the tag. This again technically works, but only if the player is standing still; if they're moving when they interact with the object, the puppet will glide off in the direction it was travelling, unable to be influenced by the player. I'm not sure if this is actually the intended behaviour or not?
- disabling the controller sensor when the tag is detected. Because the controller sensor is set to be possessable, turning it off kicks the imp out of the puppet, which stops trigger zones from working.
Is there a simple fix that I'm missing?
-
Hi,
Have you tried turning on a keyframe when you want the character to freeze, that sets the puppets move and rotate speed to zero and deceleration speed to max?
See if that helps
John -
Hey,
Thanks, that does partially solve the problem, but now the puppet slightly rotates on the spot when the keyframe activates. I think that might be related to its momentum in some way, because the faster it's moving when the keyframe turns on, the faster the puppet spins. Aside from that, it works perfectly for what I need!
Please sign in to leave a comment.