[Help] Need to use Waypoint perspective

Objective: The need to achieve waypoint perspective instead of orbital perspective, as found in this codepen

Issue: When I orbit around my origin point, I sometimes collide with the wall which creates this glitchy effect…

I believe if I can somewhat achieve the setting of navpoint as found on the codepen, it would allow me to rotate on my origin itself instead of panning while orbiting ( which causes my camera to go inside the wall for a minute )

Example Link: LookAround-Simulation (forked) - StackBlitz

On this example link you can find ourselves very close or near to a purple beam going upwards… Once I start orbitting, you may notice that despite our origin is outside and near the purple beam, during rotation it will push you inside the purple beam or cause the glitchy…

Is there anyway we can fix this?

Apologies if this might be abit confusing, You might want to use fullscreen for the glitch to happen…
Here’s a preview: Parcel Sandbox - 5 March 2025 | Loom

I see the near object glitch, but what is your expected behaviour for collisions?

I’m fine with the glitching if it collides, but if the object is near, why isn’t it rotating around it’s origin … it kinda seems it is panning around in small circle causing it to collide with the object… Like for instance if I’m completely zoomed into my origin, it should rotate around the axis, but rotating kinda moves me into objects abit…

Right that’s clear. I’ll defer tho to the viewer team to reply. Bear with us.

1 Like

I’m not sure if it helps, the codepen I shared, when I toggle to nav view point, and I zoom in completely, it allows me to rotate around my point … I understand zooming out and or zooming in would change my origin, which I can restrict and utilize fov to zoom in and zoom out…

Hi @Ahmed_Jamil

The stackblitz you forked was originally meant to provide the simplest possible way to simulate a ‘look around’ camera controller. You are right, the orbit controls do not make the camera rotate in place, but rater have it rotate around a point ever so slightly close to it. This is how the speckle orbit controls implementation works.

In order to achieve want you want and have the “waypoint perspective”, I’ve made this live example that is a fork of your fork and it adds a button that toggles between orbit and waypoint perspective. This is done by simply toggling between the orbit and fly controls, which are both available on the default camera controls. The fly controls will rotate the camera in place.

Cheers

1 Like

Many thanks, this was helpful and achieved what I wanted

2 Likes