public CharacterObservation MoveAndRotate(PlainVec3D movement, PlainVec2F rotation3, float roll, int ticks) { var vector3d = movement.ToVector3D(); if (vector3d == Vector3D.Down && Character.CurrentMovementState == MyCharacterMovementEnum.Standing && !Character.JetpackRunning) { Character.Crouch(); } else if (vector3d == Vector3D.Up && Character.CurrentMovementState == MyCharacterMovementEnum.Crouching && !Character.JetpackRunning) { Character.Stand(); } IvxrPlugin.Context.ContinuousMovementController.ChangeMovement( new ContinuousMovementContext() { MoveVector = movement, RotationVector = rotation3, Roll = roll, TicksLeft = ticks } ); return(m_observer.Observe()); }
public CharacterObservation Create(string name, PlainVec3D position, PlainVec3D orientationForward, PlainVec3D orientationUp) { m_session.CreateCharacter(name, position.ToVector3D(), orientationForward.ToVector3D(), orientationUp.ToVector3D()); return(m_observer.Observe()); }