/// <summary>
        /// Constructs a new single body linear motor.  This motor will try to move a single entity to a goal velocity or to a goal position.
        /// </summary>
        /// <param name="entity">Entity to affect.</param>
        /// <param name="point">Point in world space attached to the entity that will be motorized.</param>
        public SingleEntityLinearMotor(Entity entity, Vector3 point)
        {
            Entity = entity;
            Point  = point;

            settings            = new MotorSettings3D(this);
            settings.servo.goal = point; //Not really necessary, just helps prevent 'snapping'.
        }
Esempio n. 2
0
        /// <summary>
        /// Constructs a new single body linear motor.  This motor will try to move a single entity to a goal velocity or to a goal position.
        /// </summary>
        /// <param name="entity">Entity to affect.</param>
        /// <param name="point">Point in world space attached to the entity that will be motorized.</param>
        public SingleEntityLinearMotor(Entity entity, System.Numerics.Vector3 point)
        {
            Entity = entity;
            Point  = point;

            settings = new MotorSettings3D(this)
            {
                servo = { goal = point }
            };
            //Not really necessary, just helps prevent 'snapping'.
        }
Esempio n. 3
0
 /// <summary>
 /// Constructs a new single body linear motor.  This motor will try to move a single entity to a goal velocity or to a goal position.
 /// This constructor will start the motor with isActive = false.
 /// </summary>
 public SingleEntityLinearMotor()
 {
     Settings = new MotorSettings3D(this);
     IsActive = false;
 }