public void applyAngularImpulse(Vector3 impulse)
{
// We check if rootpart is null here because scripts don't delete if you delete the host.
// This means that unfortunately, we can pass a null physics actor to Simulate!
// Make sure we don't do that!
SceneObjectPart rootpart = m_rootPart;
if (rootpart != null)
{
if (rootpart.PhysActor != null)
{
if (!IsAttachment)
rootpart.PhysActor.AddAngularForce(impulse, true);
}
}
}