I have 2 issues, illustrated in the same Playground example.
Basically I have a setup where I have a globe. it’s origin is 0,0,0 when a user hits a button, I transform the Globe to a plane.
I ran into an issue where as the camera gets closer to (0,0,0), it slows down to a crawl. on another thread, it was explained this is how the camera works as it approaches the target.
this is an issue cuz when the globe is flattened around (0,0,0), the slowness comes into play as they attempt to get pan around.
To solve this, I project the plane up to the radius. that solves the slowness issue.
In globe form, i have code where if you click a mesh, I rotate the camera around to it, taken from some helpful other forum posts. works really well.
as a note: I had to set the camera UpVector to (0,0,1) in order to orient with the globe correctly.
I have no idea if that’s causing any issues in my current code, although I don’t think it should??
Issue 1:
however, when it’s over a plane, I don’t want to rotate it to the targeted mesh. i want to pan the camera. but I don’t want to just pan it. What I’d like to do, is preserve the viewing angle the camera is at, and slide it at a constant height above the plane to the center of the targeted mesh. so i guess it’s more of a “slide” than a pan, because all 3 values (x,y,z) have to change I’d imagine.
I have a playground where I move the camera, but it’s not right. I basically want to animate the camera until the target Vector (center of mesh) is in the center of the camera’s view, preserving its angle and height.
Issue 2:
When in plane mode, i want to the camera to be in a fixed “always up” position. the user can rotate vertically. I was able to set this. However, the panning and panning axis don’t seem to work. I want to constrain the user to pan along world x and y axis only, and not up and down. the mousewheel can do up and down, and it respects the upper/lower radius and collisions, so that’s good.
however it doesn’t seem to work? if you load the playground and then pan down, you’ll go below the plane. same in opposite direction.
Should I detach the Arc Rotate camera and switch to another type of camera (on the plane) that might be easier to configure? I kinda feel like that won’t really help, but maybe I’m wrong.
thanks