public override float Execute(float input) { float acceleration = Calculate(position, velocity, input, time_type.GetDelta()); velocity += acceleration * time_type.GetDelta(); velocity = velocity .GetTowards(0.0f, velocity * dampning * time_type.GetDelta()) .BindMagnitudeBelow(max_speed); position += velocity * time_type.GetDelta(); return(position); }
protected override bool UpdateFulfill() { float value; bool result = GetMotionValue().GetMoveTowards(target, speed * time_type.GetDelta(), out value); ForceMotionValue(value); return(result); }
protected override void UpdateInternal(float value) { targets.GetPercentCapped(value.ConvertFromOffsetToPercent()) .IfNotNull(t => this.InterpolateSpacarPosition( t.GetSpacarPosition(), speed * time_type.GetDelta() )); }
protected override float UpdateMotionValue(float current, float target) { return(current.GetTowards(target, speed * time_type.GetDelta())); }
public override float Execute(float input) { previous_output = previous_output.GetTowards(input, max_speed * time_type.GetDelta()); return(previous_output); }
public override float Execute(float input) { previous_output = previous_output.GetInterpolate(input, speed * time_type.GetDelta()); return(previous_output); }
protected override bool UpdateFulfill() { return(GetTarget().MoveTowardsLocalPlanarPosition(end, speed * time_type.GetDelta())); }