Esempio n. 1
0
        /// <summary>
        /// Adds an impulse to this <see cref="PhysicsObject"/>.
        /// </summary>
        /// <param name="impulse">Direction and length of the impulse.</param>
        public void AddImpulse(Vector3 impulse)
        {
            var action = new pe_action_impulse();

            action.impulse = impulse;
            NativeHandle.Action(action);
        }
Esempio n. 2
0
        /// <summary>
        /// Adds an impulse to this <see cref="PhysicsObject"/>. The impulse will be applied to the point in world-space.
        /// </summary>
        /// <param name="impulse">Direction and length of the impulse.</param>
        /// <param name="point">Point of application, in world-space.</param>
        public void AddImpulse(Vector3 impulse, Vector3 point)
        {
            var action = new pe_action_impulse();

            action.impulse = impulse;
            action.point   = point;
            NativeHandle.Action(action);
        }
Esempio n. 3
0
        /// <summary>
        /// Adds an angled impulse to this <see cref="PhysicsObject"/>.
        /// </summary>
        /// <param name="impulse">Angle and length of the impulse.</param>
        public void AddAngImpulse(Vector3 impulse)
        {
            var action = new pe_action_impulse
            {
                angImpulse = impulse
            };

            NativeHandle.Action(action);
        }
Esempio n. 4
0
        /// <summary>
        /// Adds an angled impulse to this <see cref="PhysicsObject"/>. The impulse will be applied to the point in world-space.
        /// </summary>
        /// <param name="impulse">Direction and length of the impulse.</param>
        /// <param name="point">Point of application in world-space.</param>
        public void AddAngImpulse(Vector3 impulse, Vector3 point)
        {
            var action = new pe_action_impulse
            {
                angImpulse = impulse,
                point      = point
            };

            NativeHandle.Action(action);
        }
Esempio n. 5
0
 void AddImpulse()
 {
     balls.ForEach(x =>
     {
         var physImpulse = new pe_action_impulse()
         {
             impulse = Vec3.Up * 100f,
             point   = Vec3.Zero,
         };
         x.Physics.Action(physImpulse);
     });
 }
Esempio n. 6
0
 internal static extern void AddImpulse(IntPtr entPtr, pe_action_impulse actionImpulse);
Esempio n. 7
0
 extern internal static void AddImpulse(IntPtr entPtr, pe_action_impulse actionImpulse);