if (physics != null) {
spatial.removeControl(physics);
}
if (isHologram) {
spatial.setShadowMode(ShadowMode.Off);
physics = new GhostControl(shape);
}
else {
spatial.setShadowMode(ShadowMode.CastAndReceive);
physics = new RigidBodyControl(shape, mass);
}