godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.79k stars 20.13k forks source link

SpringArm3D's margin not used for Camera3D #76220

Open ghost opened 1 year ago

ghost commented 1 year ago

Godot version

v4.0.2.stable.official [7a0977ce2]

System information

Windows 10

Issue description

SpringArm3D does not apply the margin property if the direct child is a Camera3D, take a look: C++ link

Steps to reproduce

  1. Set up a scene with collisions to make the spring arm do its job, bringing objects closer when colliding;
  2. Create a SpringArm3D with a direct child Camera3D: image
  3. Notice that the margin property of SpringArm3D changes nothing;
  4. Now place a Node3D between the nodes: image
  5. Notice that the margin property now correctly influences when a collision happens.

Minimal reproduction project

N/A

Calinou commented 1 year ago

See https://github.com/godotengine/godot/commit/b11bb595d137c82bbf30340ef7d8fdf6d6dc08de – this was changed when ClippedCamera was removed in 4.0.

Vivraan commented 1 year ago

Has this issue been resolved yet?

QbieShay commented 1 year ago

I think this is a bug and should be addressed. The camera shouldn't automagically decide to do a shapecast and it should respect the ray + camera configuration. clipped camera and spring arm cohexisted previously and they had different usecase for creating different types of camera. This should be still supported as it was before. I believe the existence of this issue is proof that they address different needs and both should be supported.

Zireael07 commented 1 year ago

If we agree this is a bug, why was it closed as not planned?

ghost commented 1 year ago

If we agree this is a bug, why was it closed as not planned?

Sorry, I reopened it ;)