0 votes
asked Jun 12 in Engine by ywaby (26 points)

Hey ywaby. I can see you are here too.
I was actually looking into this as well. Whatcha going to do with a custom gizmo?

I has got it in project water_pack. and reference withgodot csg src
addon main.py
```py
tool
extends EditorPlugin
...
func createspatialgizmo(forspatial):
if for
spatial is buoyancy3d:
var buoyancy
points = buoyancygizmo.new(forspatial)
return buoyancy_points

buoyancy_gizmo.pypy
tool
extends EditorSpatialGizmo
var mat
var node
func init(node):
self.node = node
set
spatialnode(node)
node.buoyancy
points.connect("datachanged", self, "redraw")
mat = SpatialMaterial.new()
mat.flags
unshaded = true
mat.flagstransparent = true
mat.flags
nodepthtest = true
mat.albedo_color = Color(0.277, 0.54, 0.74, 1)

func hightlineselectedpoint():
pass

func redraw():
clear()
var lines = []
var handles = []
var buoyancypoints = node.buoyancypoints.data
if !buoyancypoints.empty():
for point in buoyancy
points:
handles.append(point.pos)
lines.append(point.pos)
lines.append(point.pos + point.vector)
addhandles(handles)
add
lines(lines, mat, false)

```

You make code show up by adding a minimum of four spaces before the code. And keeping it one line below other text.

One space

Two space

Three spaces

Four

1 Answer

0 votes
Best answer

Well I did make a more functional spatial gizmo in my fork of your project. Remember?

answered Jun 28 by SIsilicon (1,940 points)
selected Jun 29 by ywaby
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.