Spring based hook not working properly (Spring joint issue)
Hey everyone! I'm making a game where my character has elastic arms and it was going well so far but now I ran into a problem I've been stuck on for quite some time...
The arms of my character consist of:
An elbow that doesn't move or rotate;
A bunch of objects in a row that work as joints and have a Spring Joint component whose connected body is the previous joint;
A hand connected to the last joint.
It's basically this: Shoulder <- Joint <- Joint <- Joint <- ... <- Hand
I've tweaked the parameters of the Spring Joints and the arms are working smoothly as I wanted too. But now that I'm trying to implement a mechanic that works sort of like a hook, I'm having issues.
Is there a way I can make the joints be attached to two objects?
I press an object with the mouse and I want the hand to move towards it and lock onto it.
This first part is working so far, but since the hand is attached to previous joint but that same joint is not attached to the hand, the hand goes to the object I pressed while the arm joints simply remain where they were.
What is the best solution for my problem?
I want the joints to behave as if they were attached by springs to make the arm look like it's stretching.
I hope I'm not being overly confusing and someone can help me... If there's something I didn't explain well I'm glad to clarify it!
Thanks for your time :)
Your answer
Follow this Question
Related Questions
How can I use a Spring Joint to pull two objects together? 0 Answers
How to make Spring Joint act like an actual spring? 0 Answers
How do I model a piston? 0 Answers
How to move a Spring Joint with a Rigidbody 0 Answers
Spring Joint 3d not working 0 Answers