cf_slide_v3¶
Category: math
GitHub: cute_math3d.h
Removes from a its component along a surface normal, leaving motion along the surface.
| Parameters | Description |
|---|---|
a |
The vector to slide, typically a velocity or movement delta. |
n |
The surface normal. Should be unit length. |
Remarks¶
The move-and-slide primitive: hit a wall, slide the remaining motion along it.
Equivalent to a - n * dot(a, n).