-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
PCam3D Look-at behavior doesn't follow target when Follow behavior has dampening enabled. #443
Comments
I've already resolved this issue in a fork commit here. This has only been tested using Follow Simple and Look At Simple modes, other modes have not been tested. Edit: |
Think the initial issue and proposed change looks good, so happy to include that. Am curious about what the stuttering and other issues you encountered are? |
Something to do with the camera's position being interpolated based on the PCam position while having the rotation based on the Godot Camera seemed to be the cause of the stuttering issues. I haven't had the time to dive too deeply into it and find out exactly. Here is a vid of the stuttering issue: This demo manipulates the Follow Offset property of the PCam, rotating the vector around the look at target and scaling it depending on zoom. |
Yeah, that stuttering looks quite severe. Are you just using a |
Yep thats using Simple Follow. Third Person Follow mostly did what I wanted, but it had some strange side effects that seemed due to it having collision, or with how the spring arm worked. In my project I ended up doing a different camera style than when I was originally looking into this issue, so no need for a workaround. For now I still think this is a "nice to have" feature, so I may get back to working on it over the next couple weeks and will post anything I find. |
You can disable the collision behavior of the spring arm if you want to if that's where the issue lies. Generally speaking, the spring arm is an ideal approach for doing any kind of rotation around a target, as you would otherwise have to redo what its core goal is manually, which involves a fair bit of math. Would at least strongly advise not using any other |
Issue description
When a PhantomCamera3D has both Follow Mode and Look At Mode set, with dampening enabled on Follow Mode, the camera fails to look at a moving target.
This is due to the PhantomCamera3D
_interpolate_rotation
method using the PCam's position instead of the Godot Camera Node position. The PCam position is not interpolated so it is already in the "final" position the Godot Camera is interpolating towards.Steps to reproduce
(Optional) Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: