The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Hi so I was following this tutorial by BornCG for how to make a simple dodge and collect 3D game. I was also doing a bit of freestylin' so I changed the visuals a bit to fit my liking. I say this because I wanted to figure out how to make the camera stop moving at certain points. When you reach any corners, left, right and bottom you would see this empty space and I personally don't want that, but I also want my camera to follow the player

If you fellas could help me out, I'd be happy

Godot version 3.5.1
in Engine by (17 points)

1 Answer

0 votes

Use a springarm: https://docs.godotengine.org/en/stable/classes/class_springarm.html

The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment.

Using colliders to control where the camera adjusts its view (based on the springarm movement).

You could also clamp the camera position too.

by (1,406 points)

Well, I tried to attach a collission object and shape to my camera to see if it could collide with other objects but it doesn't work. And I'm not very good with GDScript, I'm pretty much a beginner so I wouldn't know how clamping the camera works unless I follow a step by step guide

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 Frequently asked questions and 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 [email protected] with your username.