playMaker

Author Topic: contraining spring joint distance  (Read 3581 times)

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
contraining spring joint distance
« 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.   

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: contraining spring joint distance
« Reply #1 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

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Re: contraining spring joint distance
« Reply #2 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: contraining spring joint distance
« Reply #3 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

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Re: contraining spring joint distance
« Reply #4 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


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: contraining spring joint distance
« Reply #5 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

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Re: contraining spring joint distance
« Reply #6 on: March 20, 2013, 08:10:54 PM »
thanks..ill try it!