![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | NotPolar |
I am trying to get my planes linear velocity but i’m getting the error "Invalid get index ‘linear_velocity’ (on base: ‘Spatial (Plane.gd)’.
my plane’s variable is:
onready var target: Spatial = get_node(target_path)
(target path goes to the planes spatial node)
And here’s the line that breaks:
var target_velocity = target.linear_velocity
I’m pretty new to gdscript so help is much appriciated and it might just be something very simple that im missing
A Spatial
node doesn’t have the linear_velocity
property; only a RigidBody
node has the linear_velocity
property.
Ertain | 2022-02-10 06:30