I’m trying to make a simple soccer game while learning playcanvas. I am using orbitcamera.js and I want user to be able to drag back aim and shoot for the goal with orbitcamera.js.
I found this thread but it doesn’t work with orbit camera it rotates the camera.
The orbit-camera script is targeting a singe point in space, I am not sure it’s the best fit for what you are describing.
If you would still like to use this script for your camera movement: one idea is the moment the user clicks/taps to start the drag, disable the orbit camera input and start moving/dragging the ball.
You can do that using the input event handlers Playcanvas provides and add a cumulative force to the ball that will kick it forward.