12 lines
334 B
GDScript
12 lines
334 B
GDScript
extends Node
|
|
|
|
|
|
# Apply this small offset to the up vector in the look_at function to fix it
|
|
# not working when the target is perfectly aligned with the up vector
|
|
const LOOK_AT_OFFSET_FIX = Vector3(0.01, 1, 0.01)
|
|
|
|
|
|
# Compose an uniform Vector3 from a float value
|
|
func uniform_vec3(value : float):
|
|
return Vector3(value, value, value)
|