18-10-2022, 03:34 PM
(18-10-2022, 12:44 PM)josemendez Wrote: I've already pointed you to the specific example you need to use, and indicated what to do to adapt it: Make sure the object you shoot at is a rigidbody. This isn't something specific to Obi that would require an in-depth explanation, it's a basic Unity skill. If you find that problematic my advice would be to follow some Unity tutorial on gameObjects/components, otherwise you'll keep finding a lot more obstacles in your way.
For instance, in the RopeGrapplingHook scene: select the Cube(4) object, add a Rigidbody component to it, and you're done:
You might optionally want to constrain the rigidbody so that it only moves in 2D if you're going for a 2.5D game, and tweak mass value so that it's easier/harder to pull. Again, nothing specific to Obi: heavier objects are harder to move. Keep in mind that the character also has a mass value, so what matters is the mass ratio between objects just like in the real world: if the character is heavier than the object the harpoon is attached to, it will be easy to pull it, if the object is heavier than the character then it will be hard to pull.
Now, if you're modifying the ExtendableGrapplingHook.cs script, it's not working the way you want, but you refuse to share the modifications you've done so far (so that I can take a look at them and help with any errors/issues) I literally can't do anything to help you.
let me know if you need further help,
Thanks, I have solved these problems, but when I want to throw it in a direction I want in 3D and paste it on the object, it does not stick. I'm sending raycast on object direction