sp33dy / Godot-v3-Tutorials-Competent

Tutorials for Competent Godot Engine v3.0 developers
https://steemit.com/@sp33dy
MIT License
43 stars 8 forks source link

Invalid set index position error (RigidBody Chain Swing) #2

Closed adamprocter closed 6 years ago

adamprocter commented 6 years ago

Not sure what step I messed up but I get the following error on line in chain.gd 11 & 17

Invalid set index "position" (on base: 'Node') with value of type 'Vector 2'

sp33dy commented 6 years ago

Ah, it sounds like you made the base type a Node rather than Node2D; i.e. extends Node2D is what you want.

I can deduce this because base 'Node' does not have position property (http://docs.godotengine.org/en/3.0/classes/class_node.html?highlight=Node as per the docs, there is no position). You will find it in Node2D.

Kind regards

Sp33dy

adamprocter commented 6 years ago

Ah ha thanks yes!