Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  harpoon with obi rope
#11
(18-10-2022, 03:50 PM)josemendez Wrote: I'm sorry, I don't think I understand what you mean: what do you mean by "paste" it on the object? Do you mean you're shooting the grappling hook towards the object and it does not attach itself to the object?

If you want to do this in 3D, the only thing you really need to change is the LaunchHook() method in ExtendableGrapplingHook(). As-is, the raycast direction is a vector lying on the XY plane of the grapple object, which assumes you're working on 2D or 2.5D.

Depending on what exactly you want the user to do to launch the hook, you will want to write different stuff in LaunchHook(). Could you share the code you're currently using to perform the raycast?
Here its my code;

Vector3 dir = (character.transform.position - Graping.Instance.CurrentTarget.position).normalized;

        Ray ray = new Ray(transform.position, dir);

video: https://we.tl/t-ewWHIFlvXl
Reply


Messages In This Thread
harpoon with obi rope - by RuralSculpture - 18-10-2022, 09:11 AM
RE: harpoon with obi rope - by josemendez - 18-10-2022, 09:39 AM
RE: harpoon with obi rope - by RuralSculpture - 18-10-2022, 11:23 AM
RE: harpoon with obi rope - by josemendez - 18-10-2022, 11:52 AM
RE: harpoon with obi rope - by RuralSculpture - 18-10-2022, 11:56 AM
RE: harpoon with obi rope - by josemendez - 18-10-2022, 12:06 PM
RE: harpoon with obi rope - by RuralSculpture - 18-10-2022, 12:20 PM
RE: harpoon with obi rope - by josemendez - 18-10-2022, 12:44 PM
RE: harpoon with obi rope - by RuralSculpture - 18-10-2022, 03:34 PM
RE: harpoon with obi rope - by josemendez - 18-10-2022, 03:50 PM
RE: harpoon with obi rope - by RuralSculpture - 19-10-2022, 08:20 AM
RE: harpoon with obi rope - by josemendez - 19-10-2022, 09:15 AM