playMaker

Author Topic: How can i make a grappling rope?  (Read 2289 times)

LightSoftStudio

  • Guest
How can i make a grappling rope?
« on: April 30, 2013, 11:01:22 AM »
How can i make a grappling rope hit a object with a collider then pull the character towards the grappling hit object effect in playmaker?

S0ULART

  • Playmaker Newbie
  • *
  • Posts: 27
Re: How can i make a grappling rope?
« Reply #1 on: January 14, 2018, 06:37:13 PM »
push

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: How can i make a grappling rope?
« Reply #2 on: January 14, 2018, 09:50:01 PM »
I remember answering this one around a year ago on another thread. I cannot find it now :)

But basically you want to use a ray cast to shoot in the direction of your grappling hook animation. See what the raycast hits. If it is valid hit (check the tag), also maybe check the distance. (If too far, cannot get it). Then get the position. With the position, depending on your type of character controller, move them towards that position. Maybe set your character transform, tween, or whatever method you want to use to move.