- Home /
Stop pulling an object when it hits a collider
Hello everyone,
I have a loop where is follows the mouse cursor position, or hand position if you are using leap motion controller. (you have to guide the loop through a path), and I need to have the loop hanging if the mouse moves more than the limit. check the attached picture. I am not sure if physics does that for me if I use the proper collider, but I think I have to do it manually, I mean when there's a collision I have to stop the loop following the mouse/hand position..
But how to get a realistic effect, consider a real world such a game where you are holding the loop and guiding through the wire/stick and you cant get the loop out of track.. hope I could explain my point..
I need a 'how to start thinking about this' or some hints of doing it ... thanks in advance
Answer by yant · Jul 29, 2013 at 09:40 AM
Have you considered giving a try to triggers? OnTriggerEnter may be exactly the thing you are looking for.
Alternatively, you can stop changing positions of rings manually and start using AddForce method which is a bit more physics-style approach. You may want to disable Gravity for rings to get this working.
dude thanks for your time, but I think you should have posted a comment ins$$anonymous$$d. btw gravity is disabled for sure
Your answer
Follow this Question
Related Questions
physics.OverlapSphere colliders 1 Answer
Scene Loading occasionally breaks Rigid Bodies... 1 Answer
OnCollisionEnter being called without the colliders actually colliding 1 Answer
Head shoot and body shoot not working with realistic fps characterDamage 0 Answers
Optimizing colliders for a third person character action/action RPG game 1 Answer