godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.55k stars 21.26k forks source link

Visual Script Variable issue #32656

Closed mrjustaguy closed 5 years ago

mrjustaguy commented 5 years ago

Godot version: Godot 3.2 Alpha official release

OS/device including version: Windows 10

Issue description: Some nodes when created pick "Any" as their type, instead of the types they should be (vector3 for translations, rotations etc) which limit the options when dragging the output to make new nodes in case of getter nodes, and in case of setter nodes force the use of variables even if you want to set a fixed value for that node

Steps to reproduce:

  1. Create a Visual Script
  2. Create a Getter or a Setter node (Some recognize type just fine, some don't, like most under spatial don't) The result: Godot VS variable bug (The Deconstruction node was made via standard node creation, not via output creator for the get rotation node)

Minimal reproduction project: Project.zip

aaronfranke commented 5 years ago

This happens whenever the method originates from a parent class.

If you add "Get rotation_degrees" on a Spatial, the type is set as Vector3. If you add "Get rotation_degrees" on a MeshInstance, the type is set as Any.

I just opened #32673 which will make VisualScript check inheritance when getting type info.