Announcement

Collapse
No announcement yet.

Character rotation on 4.15

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

    Character rotation on 4.15

    I'm using this tutorial https://www.youtube.com/playlist?lis...iEU7hb0eomNLdq to create top down shooter, but I'm only want to use Blueprints. I started with top down template, but I want my character to look at the direction pointed by mouse and move with WASD. I already set movement and its working fine, but I can't set the rotation. I set everything like in tutorial and its not working. I've found a lot of topics showing how to do this, but there are some functions, that I can't find in newest version of the engine:
    - "Convert Mouse Location to World Space"
    or
    - "Get Hit Result Under Cursor by Channel"

    They are not exist or I must do something to make them available?

    #2
    I JUST did the same things making a Doctor Strange/Diablo inspired game.
    In the top down char, you need to find the rotation node, and connect it to the tick.
    Right now, it rotates depending on the player clicking.
    Connecting to tick will make to rotate period.
    Last edited by Kinos141; 04-24-2017, 10:28 AM.
    Check out my itch.io page, I'm really excited about it.
    https://kinos141.itch.io/

    Please check out my AI package: Action AI System Feat. Stealth
    https://www.unrealengine.com/marketp...m-feat-stealth
    or get it from itch
    https://kinos141.itch.io/action-ai-system-feat-stealth

    Comment


      #3
      Thanks for response.

      You mean "Event Tick"? I can connect it only to the last function and it does not help. Here is default blueprint:
      http://imgur.com/n0wwXFk

      Comment


        #4
        Ok, that sets rotation on the cursor, but you need setActorRotation to set the actor's rotation.

        Create that, split the pins and only connect the Z or Yaw axis. That's how you turn your char.
        Check out my itch.io page, I'm really excited about it.
        https://kinos141.itch.io/

        Please check out my AI package: Action AI System Feat. Stealth
        https://www.unrealengine.com/marketp...m-feat-stealth
        or get it from itch
        https://kinos141.itch.io/action-ai-system-feat-stealth

        Comment


          #5
          I'm not sure what exactly I need to do, I tried with that:
          http://i.imgur.com/l8OVqHM.png
          And its some kind of progress, cause my character sometimes change his rotation, but only in 90% and its verry bugged. I also dont understand, why I couldn't find function "Get Hit Result Under Cursor by Channel" which I copied from TopDown template.

          Comment


            #6
            Look in the Top Down Player Controller. It has the logic to turn the player when mouse is clicked.
            Copy paste that logic to the player character BP.
            Last edited by Kinos141; 04-24-2017, 11:23 AM.
            Check out my itch.io page, I'm really excited about it.
            https://kinos141.itch.io/

            Please check out my AI package: Action AI System Feat. Stealth
            https://www.unrealengine.com/marketp...m-feat-stealth
            or get it from itch
            https://kinos141.itch.io/action-ai-system-feat-stealth

            Comment


              #7
              Click image for larger version

Name:	2017-04-24 20_04_02-StrangeGame - Unreal Editor.png
Views:	1
Size:	232.9 KB
ID:	1126844

              Here is my setup.
              I used a look at rotation to get the desired result.
              Check out my itch.io page, I'm really excited about it.
              https://kinos141.itch.io/

              Please check out my AI package: Action AI System Feat. Stealth
              https://www.unrealengine.com/marketp...m-feat-stealth
              or get it from itch
              https://kinos141.itch.io/action-ai-system-feat-stealth

              Comment

              Working...
              X