0 votes

When my player walks to the edge of the world, I want it to display the message "You can't go there" and also I don't know how to zoom in the camera.

in Engine by (297 points)
edited by

1 Answer

0 votes
Best answer

This depends on what type of node your player is. If you're using an Area2D or one of the PhysicsObject2D nodes (RigidBody2D and KinematicBody2D), they each have ways of detecting things. Note that Area2D does not collide - it detects overlap, but does not prevent it.

See here for more information:

If you're using a Camera2D, it has a "Zoom" property in the Inspector.

by (20,485 points)
selected by
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.