godot-extended-libraries / godot-next

Godot Node Extensions - Basic Node Extensions for Godot Engine
MIT License
957 stars 61 forks source link

Add VectorDisplay2D and VectorDisplay3D #66

Closed aaronfranke closed 4 years ago

aaronfranke commented 4 years ago

This was inspired by a discussion on Discord, where a user wanted the ability to view vectors, but we wanted the avoid the inefficiency of having many node children.

You simply add VectorDisplay2D as a child of a Node2D, or VectorDisplay3D as a child of a Spatial, and specify the name of the variable to grab the information from. It can be a single vector, a PoolArray, or a GDScript array. You can also set whether or not to display relative to the parent.

In this image (the example included in the Demo3D scene), the VectorDisplay3D child is grabbing the vector information from the PoolVector3Array on its TestVectorDisplay3D parent.

Screenshot from 2020-05-22 06-01-31

willnationsdev commented 4 years ago

Thanks!