Looking for a freelook camera thats got inertia and is smooth

Anyone seen any threejs examples that has a freelook camera (like the one in babylon FreeCamera or ArcRotateCamera)?

You stand on a point and click to drag / touch drag to look around, with inertia and works nice on mobile also.

None of

seem to match
https://www.babylonjs-playground.com/#E0QUF#13

How about using OrbitControls with a setup like in the following example? three.js webgl - panorama

Nope, that’s focusing on a center point and rotating around it, no good.

Not to worry, project is locked into babylon now.

When I get time I will build the camera that I built for my Away3D projects back in the flash days and get that to integrate with touch events.

Here is an example using the orbit controls. It looks like the viewer is standing near the bottom corner of a cage and can freely look around.

OrbitControls Freelook with Intertia

The trick is to make the controls.target and camera.position almost next to each other.
In my example, they are different by z = .1

Set enableZoom to false, and enableDamping to true
Call controls.update() in your animation loop.

3 Likes

Nice little trick that :+1:

Nice one, will be bookmarking that one.

Thanks

D