/// <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) { servo = { goal = point } }; //Not really necessary, just helps prevent 'snapping'. }
/// <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; }