Esempio n. 1
0
 public void ApplyImpulse(Vector3 impulse, Vector3 position, CoordinateSpace impulseSpace = CoordinateSpace.Global, CoordinateSpace positionSpace = CoordinateSpace.Global)
 {
     if (impulseSpace == CoordinateSpace.Local) impulse = _rigidBody.Pose.ToGlobalDirection(impulse);
     if (positionSpace == CoordinateSpace.Local) position = _rigidBody.Pose.ToGlobalPosition(position);
     _rigidBody.WrappedActor.AddForceAtPosition(impulse.ToPhysX(), position.ToPhysX(), ForceMode.Impulse);
 }
Esempio n. 2
0
 public void ApplyLinearImpulse(Vector3 impulse, CoordinateSpace impulseSpace = CoordinateSpace.Global)
 {
     if (impulseSpace == CoordinateSpace.Local) impulse = _rigidBody.Pose.ToGlobalDirection(impulse);
     _rigidBody.WrappedActor.AddForce(impulse.ToPhysX(), ForceMode.Impulse);
 }
Esempio n. 3
0
 public void AddForce(Vector3 force, Vector3 position, CoordinateSpace forceSpace = CoordinateSpace.Global, CoordinateSpace positionSpace = CoordinateSpace.Global)
 {
     if (forceSpace == CoordinateSpace.Local) force = _rigidBody.Pose.ToGlobalDirection(force);
     if (positionSpace == CoordinateSpace.Local) position = _rigidBody.Pose.ToGlobalPosition(position);
     _rigidBody.WrappedActor.AddForceAtPosition(force.ToPhysX(),position.ToPhysX(),ForceMode.Force);
 }
Esempio n. 4
0
 public void AddTorque(Vector3 torque, CoordinateSpace torqueSpace = CoordinateSpace.Global)
 {
     if (torqueSpace == CoordinateSpace.Local) torque = _rigidBody.Pose.ToGlobalDirection(torque);
     _rigidBody.WrappedActor.AddTorque(torque.ToPhysX(),ForceMode.Force);
 }
Esempio n. 5
0
 public void AddForce(Vector3 force, CoordinateSpace forceSpace = CoordinateSpace.Global)
 {
     if (forceSpace == CoordinateSpace.Local) force = _rigidBody.Pose.ToGlobalDirection(force);
     _rigidBody.WrappedActor.AddForce(force.ToPhysX(),ForceMode.Force);
 }