コード例 #1
0
        /// <summary>
        /// Move this <see cref="PhysicsObject"/> in a direction, but apply the velocity instantly.
        /// </summary>
        /// <param name="direction"></param>
        public void Jump(Vector3 direction)
        {
            var action = new pe_action_move();

            //Jump mode 1 - instant velocity change
            action.iJump = 1;
            action.dir   = direction;

            NativeHandle.Action(action);
        }
コード例 #2
0
        /// <summary>
        /// Move this <see cref="PhysicsObject"/> in a direction.
        /// </summary>
        /// <param name="direction"></param>
        public void Move(Vector3 direction)
        {
            var action = new pe_action_move();

            //Jump mode 2 - just adds to current velocity
            action.iJump = 2;
            action.dir   = direction;

            NativeHandle.Action(action);
        }