Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Mode property for SpringArm3D to allow updating the SpringArm on every rendered frame #11770

Open
Bazzagibbs opened this issue Feb 14, 2025 · 1 comment · May be fixed by godotengine/godot#103962

Comments

@Bazzagibbs
Copy link

Describe the project you are working on

A third-person action RPG, camera and controls are similar to Monster Hunter or Soulsborne games

Describe the problem or limitation you are having in your project

Camera movement should not be tied to the physics update rate.

The player body moves during _physics_process, but the camera rig moves on _process and copies the body's interpolated position.

This produces perfectly smooth camera motion, even at a physics rate of 10hz, with the exception of the spring arm when the camera is near an obstacle. The spring arm causes jitter as the physics rate is lower than the framerate.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a property in the inspector that determines whether the spring arm is processed during physics, frame, or manually. This gives the user the most control to only update the spring after they have moved the camera.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Similar to AnimationPlayer::callback_mode_process, expose an enum property dropdown that determines when process_spring() is called.

Add an enum property in the inspector to control when the SpringArm performs its raycast, allowing the options:

  • Physics
  • Process
  • Manual

It would also be nice to expose the C++ SpringArm3D::process_spring() to GDScript to support manual updates.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No work around, it requires a custom implementation.

Is there a reason why this should be core and not an add-on in the asset library?

This is a small change to the existing node that makes it more useful, especially for its intended use case.

@Calinou
Copy link
Member

Calinou commented Feb 14, 2025

cc @lawnjelly

@Calinou Calinou changed the title Add "Process" field for SpringArm3D to allow updating springarm every frame Add a Mode property for SpringArm3D to allow updating the SpringArm on every rendered frame Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants