I need help figuring out how to move my 3D object in .gltf format to a different position when a checkbox is checked, and then back to its original position when the checkbox is unchecked. I attempted to create a transition function for this purpose, but the object doesn't seem to respond correctly to the checkbox.
Below is the code for my function:
function zoom() {
var move = document.getElementById('controllr');
if (move.checked) {
model2.position.set(0, 50, 0);
} else {
model2.position.set(0, 25, 0);
}
}
Any solutions or advice on how to achieve this would be greatly appreciated. I have also posted the full code in a new thread here: Moving object on checkbox event