playMaker

Author Topic: Constrained Rigidbody Stays Constrained[SOLVED]  (Read 1939 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Constrained Rigidbody Stays Constrained[SOLVED]
« on: February 12, 2014, 02:50:02 AM »
I have a cube, with a rigidbody attached, that's suspended in air. During this state, I have a "set property" action targeting the cube's rigidbody, with "freeze all" selected. This works as intended - the cube just sits there and is unaffected by forces (gravity primarily)

When a nearby button is pressed, the cube's rigidbody has its constraints removed via another "set property" action targeting the rigidbody. The idea here is that while the button is pressed, gravity will pull the cube down. But, even when the button is pressed and the constraints are unfrozen, the cube stays floating, seemingly unaffected by forces.

I have a a workaround: when the button is pressed, the cube's position is changed by .001 from its previous location (in addition to removing the constraints). For some reason, this tiny change in position is enough to "wake up" the rigidbody, and cause gravity to begin acting on the cube again.

It is working, so I am happy! But I'm curious why this teeny tiny change in position is necessary for the rigidbody to begin responding to forces again. Is there another way to "wake up" the rigidbody after adding and then removing constraints?
« Last Edit: February 13, 2014, 02:47:47 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Constrained Rigidbody Stays Constrained
« Reply #1 on: February 12, 2014, 03:28:48 AM »
Hi,

 You can actually wake it up using the action "wakeup"

bye,

 Jean

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Constrained Rigidbody Stays Constrained
« Reply #2 on: February 12, 2014, 05:40:39 PM »
Wow, duh.  ;D

I even used the phrase "wake up" in my post, and never thought to check for such an action.

Thank you Jean!