I am currently developing a threejs game.
My goal is to have a ball move from the z-position of -5000 to 0.
This is how I am creating the mesh:
let geometry = new THREE.SphereGeometry(100, 32, 32);
let material = new THREE.MeshBasicMaterial({
map: loader.load("images/SoftballColor.jpg"), side: THREE.BackSide
});
mesh = new THREE.Mesh(geometry, material);
mesh.position.set(0,0, -5000);
In my rendering function, I am using this code for the ball's movement (moving closer):
mesh.position.z += 50;
The ball moves towards me in a straight line, but what I really want is for it to move in a curved path. Any suggestions?
I will also include some images to illustrate my point better.
Thank you for your help.
Check out the image showing the ball movement here: