0 votes

I've created a small scene that implements a camera that can follow my player around. It has a KinematicBody so it can collide with rigid bodies and not pass through them. It works pretty well, but there are some times when the camera gets into a bad spot (eg, it is too far away from my player) and I want to instantaneously jump it to somewhere close by.

How do I do this? The Kinematic body methods only seem to be for sliding in a linear direction. I've tried setting the position directly with global_transform.origin = targetPos, but that get me some weird behavior sometimes. (I suspect it is intersecting with the KinematicBody of my player and that is causing weird interactions).

in Engine by (115 points)

1 Answer

0 votes

You can use it's Translation property to move it instantly.

by (352 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.