godot_recipes icon indicating copy to clipboard operation
godot_recipes copied to clipboard

[Discussion] 3D: Camera gimbal

Open cbscribe opened this issue 4 years ago • 4 comments

Discussion for http://godotrecipes.com/3d/camera_gimbal/

cbscribe avatar Feb 03 '21 02:02 cbscribe

**LOVE this idea. i was wondering with the camera zoom portion is there a way to zoom from 3rd person and snapping it in to first person once it reaches a distance close enough you just snap to first person. and obviously wile in first person the Gimble will be deactivated. i was wondering if that's possible if so please share! iv been looking for a solution to this problem for 4 months.

P.S. I'm aware there's videos on a button toggle from third person to first person but that's not the design I'm seeking. scroll wheel would be more smoother. that way i could not only change my perspective but also would have full control how far or close i want to See. if i wanna see my player or if i want to be the Player.**

PhoRealGames avatar Dec 24 '21 14:12 PhoRealGames

Of course it's possible - you just have to write the code to make it work. If nobody has already built and explained a solution to your specific problem, you could have spent that 4 months figuring out how to make it yourself.

At a certain zoom level, you want to transition to first person, so in your code you'd detect that and disable the camera movement or (probably easier) switch to a fixed first person camera. This could all be done with a few if conditions.

cbscribe avatar Dec 24 '21 17:12 cbscribe

Of course it's possible - you just have to write the code to make it work. If nobody has already built and explained a solution to your specific problem, you could have spent that 4 months figuring out how to make it yourself.

At a certain zoom level, you want to transition to first person, so in your code you'd detect that and disable the camera movement or (probably easier) switch to a fixed first person camera. This could all be done with a few if conditions.

thank you for this very helpful i think i figured out the formula for the Scroll weel. and switching from first to third via scroll weel. thanks again.

PhoRealGames avatar Feb 07 '22 17:02 PhoRealGames

There are more recent versions of the gimbal camera setup, utilizing the SpringArm3D node to prevent the camera from going beyond a collision, such as walls. This could be an extra section on the already existing page, so that way you can decide what you need, or don't need.

Kimmyera avatar Apr 04 '24 06:04 Kimmyera