Forum rules - please read before posting.

Turn on physics after viewing an object

Hello. After viewing the subject, the physics of the subject does not turn on. How to include physics in an ActionList?
Link to video:

Link to screenshots ActionList:
https://ibb.co/zQJ2fyJ
https://ibb.co/VCGLckD
I turn on physics like this: Object-Call event public function Rigidbody.isKinematic

Comments

  • What's the exact issue here? That the Rigidbody's Is Kinematic field is not set the intended value? If you check/uncheck it manually, does it work as intended?

    As the message in the Action states, a Unity limitation means that the Object: Call event Action has trouble passing parameter values - and this includes a checkbox's state. It's also the case that you're calling this from an asset file, and it's not possible to reference scene objects with events like you can with other Actions.

    Try instead doing this with animation. Attach an Animator to the Rigidbody and give it two animations that just control the Is Kinematic property - one to turn it on, the other to turn it off. Create a Bool Animator parameter, and transitions between the two based on this parameter's value. You can then use the Object: Animate Action, with a Mecanim animation engine, to set this Bool parameter's value - and in turn, the kinematic state.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.