mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Character controller now moving! 🏃♂️
- Added character controller transform syncing Jolt -> Scene - Physic system code cleanup - Fixed crash with WrenScript loading - Fixed Normalize() returning NaN vector when lenght is 0
This commit is contained in:
@@ -108,10 +108,14 @@ class Vector3 {
|
||||
|
||||
Normalize() {
|
||||
var length = this.Length()
|
||||
var x = _x / length
|
||||
var y = _y / length
|
||||
var z = _z / length
|
||||
return Vector3.new(x, y, z)
|
||||
if(length > 0.0) {
|
||||
var x = _x / length
|
||||
var y = _y / length
|
||||
var z = _z / length
|
||||
return Vector3.new(x, y, z)
|
||||
}
|
||||
|
||||
return Vector3.new(0, 0, 0)
|
||||
}
|
||||
|
||||
Angle(vec) {
|
||||
|
||||
Reference in New Issue
Block a user