Announcement

Collapse
No announcement yet.

Grappling Hook - Rotating a Character Along a Vector

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

  • started a topic Grappling Hook - Rotating a Character Along a Vector

    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

  • replied
    wah.. really

    Leave a comment:


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

    Leave a comment:


  • replied
    Thank you so much.

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

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    I'm not using any physics constraint components.

    Leave a comment:


  • replied
    Is it using a physics constraint component?

    Leave a comment:


  • replied
    I'm still lost

    Leave a comment:


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

    Leave a comment:

Working...
X