Hello! I’m new to scripting in Zap.works and a modest programmer, so thanks in advance for your patience.
I would like to get into touch events, and want to start by moving a plane with a finger drag. Please note that I want to be able to move objects directly and not use the 3D Photofeature function.
I have a pointmove script for the plane with this script in it. I’m trying to access the array of the finger position using e.localPosition and feed that into the position method of the plane. I think the error means a variable type mismatch. Can anyone help?
parent.on(“pointermove”, (e) => {
var fingerPosition = ([e.localPosition]);
parent.position([fingerPosition]);
//Error thrown: Argument of type number [][][]`` is not assignable to parameter of type
number []., //Type
number []` is not assignable ot type number.
});