playMaker

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

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
contraining spring joint distance
« on: March 16, 2013, 04: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: 14611
  • Official Playmaker Support
    • View Profile
Re: contraining spring joint distance
« Reply #1 on: March 17, 2013, 11:50:59 PM »
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
    • View Profile
Re: contraining spring joint distance
« Reply #2 on: March 18, 2013, 07: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: 14611
  • Official Playmaker Support
    • View Profile
Re: contraining spring joint distance
« Reply #3 on: March 18, 2013, 10:17:51 PM »
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
    • View Profile
Re: contraining spring joint distance
« Reply #4 on: March 19, 2013, 08: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: 14611
  • Official Playmaker Support
    • View Profile
Re: contraining spring joint distance
« Reply #5 on: March 20, 2013, 03: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
    • View Profile
Re: contraining spring joint distance
« Reply #6 on: March 20, 2013, 05:10:54 PM »
thanks..ill try it!