playMaker

Author Topic: Difficulty disabling Rigidbody 2D on projectile [SOLVED]  (Read 1347 times)

TheNecron

  • Playmaker Newbie
  • *
  • Posts: 17
Difficulty disabling Rigidbody 2D on projectile [SOLVED]
« on: August 02, 2019, 12:02:41 AM »
I'm using a projectile with a Rigidbody 2D that I want to disable with an fsm at a certain point and while I can disable the BoxCollider2D through the Enable Behavior action whenever I attempt to replicate that with Rigidbody 2D in place of BoxCollider2D it gives "Error Editting Action, Type cannot be null." I don't really understand why this occurs and if I'm missing something basic that would do this.
« Last Edit: August 03, 2019, 10:35:10 AM by TheNecron »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Difficulty disabling Rigidbody 2D on projectile
« Reply #1 on: August 03, 2019, 01:47:35 AM »
Hi.
You can't disable a Rigidbody, but you can set the rigidbody type @ runtime with

"SetRigidBodyType2D" (Ecosystem)

For collider you can set as trigger (Set Collider 2d Is Trigger)
or Activate/deactivate the component (search for 'activate component' on the Ecosystem)

TheNecron

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Difficulty disabling Rigidbody 2D on projectile
« Reply #2 on: August 03, 2019, 10:34:46 AM »
Hi.
You can't disable a Rigidbody, but you can set the rigidbody type @ runtime with

"SetRigidBodyType2D" (Ecosystem)

For collider you can set as trigger (Set Collider 2d Is Trigger)
or Activate/deactivate the component (search for 'activate component' on the Ecosystem)

Thanks, the SetRigidBodyType command on ecosystem was enough for what I was trying to do.