Announcement

Collapse
No announcement yet.

Grappling Hook - Rotating a Character Along a Vector

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

    Grappling Hook - Rotating a Character Along a Vector

    I'm creating a game where players can grapple onto objects and swing. Although the grappling system is working, the character doesn't have any rotations to make them look like they are hanging from a rope.

    Essentially, I want my ThirdPersonCharacter's upward orientation to always point toward a location (the location they are grappling to).

    This is what I mean by upward orientation facing the grapple location: https://gfycat.com/VibrantSparklingGordonsetter

    #2
    I am no expert but there is a node called "Find Look At Rotation". Maybe this will help.

    Comment


      #3
      I'm still lost

      Comment


        #4
        Is it using a physics constraint component?

        Comment


          #5
          I'm not using any physics constraint components.

          Comment


            #6
            With Tick: SetWorldRotation(Character, MakeRotFromZ(Normalize(GetWorldLocation(Grapplepoint)-GetWorldLocation(Character))))

            Here's a physicy grappling rig, if you want to take a look.
            Last edited by xnihil0zer0; 07-07-2016, 12:39 AM.

            Comment


              #7
              Yes! Thank you! Do you know how I can make my character face the direction she is moving in while she's swinging?

              Comment


                #8
                Try either, GetVelocity(CharacterActor), GetComponentVelocity(CharacterComponent) or GetPhysicsLinearVelocity(CharacterComponent). Normalize it. Replace MakeRotFromZ with MakeRotFromXZ, Feed the normalized CharacterVelocity into X and the normalized GrapplePoint-CharacterLocation into Z.

                Comment


                  #9
                  Thank you so much.

                  Here's a gif of the new mechanic in action (needs a lot of work): https://gfycat.com/VigilantSparseItaliangreyhound

                  Comment


                    #10
                    Im here in 2019, could I get some help on how you made the grappling hook system?

                    Comment


                      #11
                      wah.. really

                      Comment

                      Working...
                      X