I want to send a vector value from script to the editor (in order to change the spray angle of an emitter). What is wrong with the line
Patches.setVectorValue('sprayAngle', Reactive.pack3(0, 0, 0));
?
It marks an unknown runtime error at the first parenthesis.
I suppose, there actually needs to be a Vector
as the second argument (and not VectorSignal
), but how do I create a custom vector? There is afaik nothing like new Vector()
in Spark AR.
Sending boolean and scalar values is no problem though, the problem is just with sending Vector or Point. I am somewhat confused with these signals/non-signals, Vectors/Points.
So, as Sergiu Paraschiv already mentioned in the comments, it needs to be
Patches.setVectorValue('sprayAngle', Reactive.vector(0, 0, 0));