sergeypdev 0226e83010 A bunch of tweaks
- Add max steering lock and limit drift assist to never exceed it
- Bring back tyre curve debug
- Show relevant wheel debug values
- Calculate camber for pacejka
2025-08-04 00:35:46 +04:00

15 lines
420 B
Odin

// "Engine" math, to avoid aliasing with core:math
package emath
import "core:math"
_ :: math
exp_smooth :: proc "contextless" (target: $T, pos: T, speed: f32, dt: f32) -> T {
return pos + ((target - pos) * (1.0 - math.exp_f32(-speed * dt)))
}
exp_smooth_angle :: proc "contextless" (target: $T, pos: T, speed: f32, dt: f32) -> T {
return pos + (math.angle_diff(pos, target) * (1.0 - math.exp_f32(-speed * dt)))
}