Announcement

Collapse
No announcement yet.

Rotation of player works incorrectly

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

    Rotation of player works incorrectly

    Hi!

    I'm new to UE so my question will be silly, I think. Also I'm very sorry for lagging and poor quality video.

    I would like to my player rotate to mouse cursor. There is a good answer on this forum how it should be done. I create project from Top Down Template and implement it. All works good.


    There is Blueprint
    Click image for larger version

Name:	Top Down Template.png
Views:	1
Size:	302.0 KB
ID:	1208749

    After that I decided to learn project structure and how to create game from scratch. So I created Empty Blueprint project. Create Wizard Blueprint (inherits from Character) and WizardController (inherits from PlayerController). Also I implement the same blueprint for rotation. But as result character is always look ahead and not rotating but it's like as the world is rotating around the character.


    There is Blueprint
    Click image for larger version

Name:	Empty Project.png
Views:	1
Size:	306.7 KB
ID:	1208750

    Where is my error?

    #2
    Hey!

    I think in your newly created character camera is following controller rotation.
    Try changing "Use Pawn control rotation" in Camera settings to false
    SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
    Level design and prototyping for newbies

    Comment


      #3
      Hi zeOrb!

      Thanks for your response but "Use Pawn Control Rotation" is disabled.

      Click image for larger version

Name:	Use Pawn Control Rotation.png
Views:	1
Size:	58.3 KB
ID:	1122486

      Comment


        #4
        Oh, you're using spring arm!
        Disable "Inherit Yaw" on that component
        SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
        Level design and prototyping for newbies

        Comment


          #5
          It works! Thank you!

          But I have another (offtopic) question. Disabling "Inherit Yaw" on Spring Arm component in Empty Project fixed the issue with rotation. But why disabling/enabling this property on Spring Arm component in Top Down Template do nothing?

          Sorry for my English

          Comment


            #6
            because its a crazy engine not everything is straight forward in it.

            Comment


              #7
              Originally posted by nightblaze1 View Post
              It works! Thank you!

              But I have another (offtopic) question. Disabling "Inherit Yaw" on Spring Arm component in Empty Project fixed the issue with rotation. But why disabling/enabling this property on Spring Arm component in Top Down Template do nothing?

              Sorry for my English
              You're using different method to apply rotation for your character. In TopDown example developers used "Orient Rotation To Movement" in Character Movement Component to rotate Skeletal Mesh(Only visual effect) without touching CapsuleComponent which is used by game logic and physics. For example, enabling above mentioned settings in Spring Arm(Inherit Pitch, Yaw & Roll) will use rotation of Parent component which in this case - Capsule Component
              SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
              Level design and prototyping for newbies

              Comment

              Working...
              X