Point ArcRotateCamera at position?

I’d like to, when I click, center the camera on the clicked sphere in this playground.
Not target the sphere, but position the camera such that the sphere is between the camera and the target.


Thanks c:

camera.target = {positionVector}

or maybe .position somewhere along the line from the center through the sphere


The target of the camera is the point it rotates around. I want to still be rotating about the center of the scene while looking at the clicked mesh. As though I manually left-click-dragged the screen to place the mesh in the center.

As for position, you can’t set the position of an ArcRotateCamera. If I could find the alpha and beta of a mesh relative to a target I could set that instead, but I’m not sure that’s possible.

Somewhere along the circle or sphere?

Might have to get creative or end up in quaternion territory.

1 Like

Oh you’re right, my bad. I was trying to set the position itself; didn’t realize setPosition was a thing.


1 Like