Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: roach_779 on March 16, 2013, 07:17:56 PM

Title: contraining spring joint distance
Post by: roach_779 on March 16, 2013, 07:17:56 PM
Hi

I have an object with a spring joint constrained to a pivot. I am able to grab the object with a mouse, let go and object would spring back-and-forth until it stops. What I want is to put a distance constraint. When I grab the object and KEEP pulling back, once set distance is reached, I want the object to automatically let go.

Thanks.   
Title: Re: contraining spring joint distance
Post by: jeanfabre on March 18, 2013, 02:50:59 AM
hi,

 I guess one way would be to monitor the distance and delete the spring when you detect a max out.

 have you tried that?

bye,

 Jean
Title: Re: contraining spring joint distance
Post by: roach_779 on March 18, 2013, 10:14:10 PM
Thanks for the info. I want my object to spring back (with physics) to original position. I tried containing the object in box with reverse normal and rigidbody, but for some reason the object slips right through. Still no solution.
Title: Re: contraining spring joint distance
Post by: jeanfabre on March 19, 2013, 01:17:51 AM
Hi,

 what technic do you use to control the spring? is it something you picked on this forum?

bye,

 Jean
Title: Re: contraining spring joint distance
Post by: roach_779 on March 19, 2013, 11:39:18 PM
spring done by spring joint

using action called followMouse I in the forum
http://hutonggames.com/playmakerforum/index.php?topic=2509.0

Title: Re: contraining spring joint distance
Post by: jeanfabre on March 20, 2013, 06:03:18 AM
Hi,

 then try to work from this solution instead:

http://hutonggames.com/playmakerforum/index.php?topic=1286.msg7149#msg7149


bye,

 Jean
Title: Re: contraining spring joint distance
Post by: roach_779 on March 20, 2013, 08:10:54 PM
thanks..ill try it!