Announcement

Collapse
No announcement yet.

Get SpringArmComponent relative rotation no longer works

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get SpringArmComponent relative rotation no longer works

    Hi,

    So according to this thread, the SpringArmComponent is no longer changing relative rotation when moving around the target (like the Character in a TPP setup).
    https://answers.unrealengine.com/que...in-417-an.html

    The GetControlRotation() and the GetBaseAimRotation() on the Pawn are all returning rotation in world space, which is not what I'm after.

    Does anyone know an easy way to get the relative rotation of an attached SpringArmComponent?

  • replied
    Originally posted by marvelmaster View Post
    This does not work for me...with this solution I can not turn my character using wasd because Camera stays behind player 100%

    AND

    btw Linetrace from camera isnt possible anymore q.q because you can not get its rotation with the old boom
    Well, this is far from a complete solution, but a hint to make it work. You'll need to work your way around based on what your needs from it are.

    Leave a comment:


  • replied
    This does not work for me...with this solution I can not turn my character using wasd because Camera stays behind player 100%

    AND

    btw Linetrace from camera isnt possible anymore q.q because you can not get its rotation with the old boom
    Last edited by marvelmaster; 11-26-2017, 12:02 AM.

    Leave a comment:


  • replied
    Glad this helped!

    Leave a comment:


  • replied
    Yep, manually rotating the camera based on the input has resolved the issue!

    Thank you very much EU_Coxis, this was driving me and my character's head crazy!

    Leave a comment:


  • replied
    Hmmm, I get the same result as you.

    However, I found out that it worked for me in the previous videos, because, I'm not using the "use pawn control rotation" on it and rotate it by input values. So I made the same in the fresh template and it works as well.


    Click image for larger version

Name:	Capture.PNG
Views:	2
Size:	341.1 KB
ID:	1391287

    Attached Files

    Leave a comment:


  • replied
    Thanks again, EU_Coxis !

    I have created a fresh TP Template project, opened the CharacterBP and printed the relative rotation of the spring arm each tick. As you can see it returns a zero rotator:

    Click image for larger version

Name:	whichcraft.jpg
Views:	1
Size:	340.5 KB
ID:	1391190
    Indeed I would expect it to print out the rotation as you have described and demonstrated in the video. My setup was utilizing the relative rotation of the spring arm (for rotating the character's head), but now it is broken.

    A bug report was made on the issue (link in op), but according to Epic, it is not a bug, but the new intended behavior.

    But considering that you are on 4.18 as well, this is rather confusing. Could you please possibly confirm if the same setup as above produces different result for you?

    Thanks for your help!

    Leave a comment:


  • replied
    Hey Kontur , sorry for the late response. Apparently they need to approve my first few posts on the forums.

    I am also using UE 4.18 and the "get relative rotation" works for me. I made 2 videos for you to see how that works for me. The first one is my blueprint setup, in which you can see how I use that relative rotation to turn my character if the 3rd person spring arm is exceeding my 134 degrees threshold to the left or right of the character.

    https://www.youtube.com/watch?v=KKYRHQOeW2M

    In the second video, you're able to see the actual output of that rotation of the 3rd person spring arm relative to my character capsule, whatever it's world rotation is.

    https://www.youtube.com/watch?v=AdvcnDlhoSw

    Hope this helps you in your endeavour.

    Leave a comment:


  • replied
    Hi EU_Coxis , thanks for your input!

    Which engine version are you using? I am using 4.18 (sorry, forgot to mention in the original post), and according to the answerhub page I have linked, the SpringArmComponent's behavior has been changed and the GetRelativeRotation() method returns a zero rotator by design.

    From the answerhub by Natalia form Epic:
    After looking into this I found out that this is actually by design. A bug existed where it did rotate on all axis in previous engine versions, but that caused multiple issues with performance and not being able to make changes to the rotation.

    That issue was fixed and the rotation stays at zero now, by design. I hope this clarifies any concerns and questions you might have relating to this. Please let me know if there is anything else that I can help you with.
    Which is fine, but it broke everything that was relying on the relative rotation of the SpringArmComponent.

    How can I get the relative rotation of a SpringArmComponent relative to the parent.?

    Leave a comment:


  • replied
    Hey, I'm a newbie to unreal, but doesn't "Get relative rotation" work for you?

    Click image for larger version

Name:	sdafasdf.PNG
Views:	1
Size:	12.9 KB
ID:	1390681

    I used this successfully in my blueprints. I.E.:
    Click image for larger version

Name:	gdabvfv.PNG
Views:	2
Size:	131.7 KB
ID:	1390683

    Hope this helps.
    Attached Files

    Leave a comment:

Working...
X