-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
PhantomCamera3D.set_third_person_rotation() rotates the camera around its own #399
Comments
@marinho A bit late, but if you don't set the follow offset the rotation will work ( rotate around the point ). |
Sorry, missed the initial post for this. Yes, the offset effectively sets the position of the spring arm. |
thank you folks. I haven't worked on this project for a while, so, I must look back into it to recall if I made it to get it fixed anyhow. thank you again! |
I think this does raise the question of whether if there would be value in having the option to both offset the spring arm's point position and the camera itself relative to the spring arm's |
I think it's natural to want to offset a 3rd person camera while expecting it to orbit around the target's origin. This seems like the obvious use case for offsets. What is the recommended way to get the camera to sit back in a 3rd person position but still orbit the target origin? Just manually move the camera? Edit: You can't just manually move the camera so I'm not sure how we're meant to do this, create a target node that is in the position we want? Edit2: After having said that, it seemed really obvious. Maybe documentation or something to help a user get there faster? For future travelers, here's what I did: |
I would suspect being able to specific the offset of the coordinate the camera orbits would be the most basic want. Otherwise, you are reliant on the orbiting point being the exact center of the followed target, which I reckon is not always the desired outcome; e.g. when used on a humanoid-like character model. So keeping that behavior as is, I think, is valid for the above reason, but also to align with the behavior of the other It shouldn't be much effort to add a secondary offset for this particular |
Just chiming in that I've sort of worked around this issue by offsetting a follow target from desired rotation pivot to achieve the third person camera looking over the shoulder of the player, as noted above in @rohanrichards's edit #2. This maintains the right relative offset to the player regardless of camera orbit direction, which is good, but this approach still has the significant issue that with the follow target being outside of the player's collision shape, it can penetrate walls and objects. When it does so, the camera clips into and through walls, being that the origin of the spring arm is effectively already in the wall. That's my theory, but perhaps I'm missing something. Thanks for the excellent add-on! |
Just thinking out loud, but your follow target can be any node, so it could
have its own collider and it's own collision logic
…On Mon, 3 Mar 2025, 7:01 am Troy Kinsella, ***@***.***> wrote:
Just chiming in that I've sort of worked around this issue by offsetting a
follow target from desired rotation pivot to achieve the third person
camera looking over the shoulder of the player, as noted above in
@rohanrichards <https://github.com/rohanrichards>'s edit #2. This
maintains the right relative offset to the player regardless of camera
orbit direction, which is good, but this approach still has the significant
issue that with the follow target being outside of the player's collision
shape, it can penetrate walls and objects. When it does so, the camera
clips into and through walls, being that the origin of the spring arm is
effective already in the wall. That's my theory, but perhaps I'm missing
something.
Thanks for the excellent add-on!
—
Reply to this email directly, view it on GitHub
<#399 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3YOMTJDZJBO6M5VSS5YJT2SNWS3AVCNFSM6AAAAABPVGKPPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSHEYDKOJWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: troykinsella]*troykinsella* left a comment
(ramokz/phantom-camera#399)
<#399 (comment)>
Just chiming in that I've sort of worked around this issue by offsetting a
follow target from desired rotation pivot to achieve the third person
camera looking over the shoulder of the player, as noted above in
@rohanrichards <https://github.com/rohanrichards>'s edit #2. This
maintains the right relative offset to the player regardless of camera
orbit direction, which is good, but this approach still has the significant
issue that with the follow target being outside of the player's collision
shape, it can penetrate walls and objects. When it does so, the camera
clips into and through walls, being that the origin of the spring arm is
effective already in the wall. That's my theory, but perhaps I'm missing
something.
Thanks for the excellent add-on!
—
Reply to this email directly, view it on GitHub
<#399 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3YOMTJDZJBO6M5VSS5YJT2SNWS3AVCNFSM6AAAAABPVGKPPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSHEYDKOJWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yeah, good thought. Also thinking out loud, my initial concern there is that the player can't touch the wall if the camera is pointing a certain direction, assuming the follow target offset is a static distance. Or, maybe the offset could itself be on a spring arm. Anyways, you triggered several experiment ideas to try out. Thanks @rohanrichards! |
Issue description
For a PCam with follow_mode as ThirdPerson, I wrote this code expecting the camera to rotate around the target (which is the character object), but instead, this method is actually rotating the camera around its own Y.
Steps to reproduce
a. Priority = 0
b. Follow Mode = Third Person
c. Follow Target = CharacterBody3D
d. Follow Offset = (0, 10, 10)
e. Spring Length = 10
f. Create a script and add the code I wrote above
g. Run
(Optional) Minimal reproduction project
Additionally, if I set Look at Mode to Siple and Look at Target to CharacterBody3D (in face any other object), the camera will as well point to bottom with no clear reason.
Thanks!
The text was updated successfully, but these errors were encountered: