Closed citizenken closed 4 months ago
I realized that I was setting the spawn position after the initialize
call. I was able to fix this by setting a spawn_point
property on the node, and setting global_position
before calling initialize
. Nevermind!
When I initially spawn my vehicle controller + vehicle nodes, the
local_velocity
seems to be calculated relative to the scene origin, which causes a crazy highlocal_velocity
. As a test, I spawned my node at(0,0,0)
and there was no movement, again at(10, 0, 10)
and see some slight drifting, then again at(200, 0, 200)
which results in the car flying off crazy.I think the issue is this line, where its trying to lerp from the initial position to
(0, 0, 0)
Spawned at (0, 0, 0):
Spawned at (10, 0, 10):
Spawned at (200, 0, 200)
I tested this on the
demo_arcade
scene spawning the car in various positions without the same effect.Any idea on what could be up about this? It's a pretty big issue at this point. Thanks!