I want to animate a moving object in Makie
For this, I do the following
using GLMakie, FileIO
x = Node{Float32}(0.0)
y = Node{Float32}(0.0)
z = Node{Float32}(0.0)
data = load("mesh.stl")
fig, ax, plt = mesh(data)
translate!(plt,x,y,z)
Then I obtain the following error MethodError: no method matching Float32(::Observable{Float32}). Note that it works if x, y, z are Floats instead of Nodes.
I also tried translating by vec = @lift Vec3f0($x,$y,$z) and it doesn’t work either.
It also does not work for 3d scatter plots (say fig, ax, plt = scatter([0.,0.,0.])
A workaround would be to operate on the mesh directly. Anyone knows how to do this efficiently?
But this all bitrotted a bit and isn’t that user friendly right now… You can have a look at the constructors for Transformation to see how to pass it the translate Observable…