#Disable and enable back physic on an entity

1 messages · Page 1 of 1 (latest)

lethal marlin
#

Hello everyone,
I have a piece of code (a spell which can manipulate objects) which disable the physic (saving and removing the PhysicWorldIndex).
Then I enable it back (restoring the PhysicWorldIndex), but there is no longer any collisions with the entity (even though it's in the BuildPhysicsWorld).
Same thing when I just swap the index value (not removing the component), looks like the index method wasn't a proper one (or I'm just stupid, which I would prefer).
Any ideas ?
Thanks !

signal onyx
lethal marlin
signal onyx
#

(assumptions)

lethal marlin
#

okay 😂 thanks anyways ^^

signal onyx
#

@lethal marlin A workaround. Turn the object to kinematic and set collision response to none.

As in, remove PhysicsVelocity

and

physicsCollider.ColliderPtr->SetCollisionResponse(CollisionResponsePolicy.None);
lethal marlin
signal onyx
lethal marlin