Announcement

Collapse
No announcement yet.

Help with Transforms?

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

    Help with Transforms?

    I've been trying to get a character to move to a new location a certain distance behind another character and stay behind that character as it moves around.
    I'm looking for a way to do it in code and not blueprints (unless there is no other way). I think my problem is more with understanding how a transform works in UE4.
    I've looked through various posts and the API (wish it had some example code like the MSDN) and have come up still confused.

    If I know both character locations what steps would I need to take to figure out the location I should be moving the character to be behind the other one?
    I'm looking mostly for guidance and a push in the right direction mostly. Thanks for your time guys.

    #2
    Way not figuer out the distance you want the player to be from the other player.
    Then calculate the the "offset" so when the location of the first player updates its tells the second player to update its location.
    With the calculated offsett for from the first character.

    Or attach a character to a Arm Spring component like a 3rd person camera. (dont know if that will realy work.)

    WCode.

    Comment


      #3
      I'll give those ideas a try, thanks.

      Comment


        #4
        Adding a spring arm to the target and then attaching to the socket actually worked. Great idea.

        Comment


          #5
          Originally posted by Jandar78 View Post
          Adding a spring arm to the target and then attaching to the socket actually worked. Great idea.
          Glad i could help out.
          WCode

          Comment

          Working...
          X