Returns a packed "FadeParams" vector for a shader. The standard packing format is:
Component | Value |
---|---|
x | near |
y | 1 / (far - near ) |
z | (unused) |
w | (unused) |
public bool TryGetSecant(Vector3 position, Vector3 velocity, Vector3 acceleration, float arcDistance, out Vector3 secant) { | |
if (acceleration == Vector3.zero) { | |
secant = velocity; | |
return false; | |
} | |
var axis = Vector3.Cross(velocity, acceleration); | |
if (axis == Vector3.zero) { | |
secant = velocity; |