Hi S! I LOVE this topic. https://www.babylonjs-playground.com/#1YD970#120
There’s a testing playground… not like a building-with-rooms’n’hallways scene, but it’s still something to play-with. It has a “carBody” which travels the path, it can be set visible or not, it can be used as a camera parent or position plotter, but NOTE… this car does not pitch and yaw based-upon the path. It should be used for POSITION only, not direction-setting… so parenting camera to car, is likely not useful.
As you can see, all standard camera-navigation keys, pointer-drags, and mousewheel-rolls… fight-with the automated tour… same problems as sinaeth mentioned.
Scene is set-up for free cam or arc cam, and no .lockedTarget. Instead, lines 124-150… is an experimenter’s render-loop area… where demented people play.
Further down, lines 153-183… we have installed a mousewheel for the freeCamera, as wanted. I have it hotwired for Firefox… using event.deltaY. Other browsers may vary. Lines 159 and 163 are lines of concern.
I call this topic… “soft-guided tour”. This is where a “tourist” is taken on an automated guided tour, but can pause the tour at any “point”, then have near-full “investigate something” freedom, yet remind the user that they can return to the guided tour… (with a button?).
In a way, it’s like parenting with rubber bands. The “tourist” is allowed to wander-away from the group, yet have a rubber band to return them to the guided tour. The guided tour SHOULD pause… while one of its tourists wanders-off on a personal exploration/investigation. That way the tourist doesn’t miss anything on the tour. They are returned to the guided tour… at the point where they wandered-off.
Let’s pretend there IS a button/label called “Free-Fly Tour Here”… which, when clicked, stops the guided tour camera positioning/targeting system, changes its label to “Resume Guided Tour”, and then allows user standard FreeCam/UniversalCam.
The “Resume Guided Tour” button (“resume” event)… should do something fancy… at LEAST gently animate back-to guided tour current position. THAT could get a VR-gear wearer… motion sick. Perhaps better to fade-to-black, re-position/target cam, then fade-up again and re-activate the auto-tour with a gentle ease-up-to full tour-speed.
A bit more about rubber bands, magnetism, and guided tours that have automatic “feature-upon” targets. “Featuring-upon” a room or thing… as the guided tour “passes-by”… is a real nice thing. As a slow-moving guided tour travels a virtual hallway, it might be swinging left/right to look-into rooms thru their open doors. In a way, it is “target magnetism”. Even though the “tour guide” sort-of dictates that the camera look straight ahead as the tourist walks the halls, curiosity “pulls” the tourist’s eyes (aiming)… into the open doorways (or other ‘featured’ tour-items) as the tour passes-by. This is done automatically… part of the “featured” things along the soft-guided tour.
During the look-into-the-doorways… is when a user is likely to roll a mousewheel… to see some things inside the room… CLOSER. Let’s say THAT mousewheeling… is an indicator to stop the auto-tour, set camera to free-roam default, and display the “resume tour” button. The tourist has just shown indication that they want to investigate/explore. Detach from tour.
Ok, that’s me, talking way too much, as usual. Soft-targeting… magnetism-targeting… curiosity-based tour detach/resume… all things that COULD be pondered, here. LOVE IT! We could REALLY use camera magnets and magnetic field generators. Essentially, pulling a camera-craft (and/or its aiming target) around in outer space, using gravitational pulls from planetary bodies or invisible black holes. heh. YEE HA. FUN!
A bit more: I think… only the tour guide (or user-done camera navving) can position the camera itself (camBody magnetism/soft-control). Both tour guide and/or featured items… can position the camTarget (camTarget magnetism/soft-control). During (slow?) guided tour, camTarget positioning (to aim at featured items momentarily) needs to be done with gentle animation… to avoid VR head-gear vertigo issues, I suppose. Looking left/right repatedly, into room doors… could cause eyeball vomiting… for VR headgear users.
Let’s say the cameraTarget gets pulled toward an item in a side-room, as the tour passes down the hallway. The tour guide continues down the hallway, using ITS camTarget rubber band… to try to pull the camera’s “attention” back to “hallway-forward” aim. But the item within the side-room, has a strong magnetic pull… and tries to hold the camera’s aim-attention. As the tour guide gets further way, its pull actually increases (tour guide repeatedly insisting that you to stay with the group). Eventually, the tour guide’s increasing pull… out-pulls the featured-item magnetism, and the cameraTarget SHOULD SLOWLY swing back around to the tour guide/hallway-forward. DURING that tug-o-war, overlapping magnetic fields fight-over the cameraTarget position… based upon distances and field strengths. Phew… cool.
Ok, sorry if that’s too deep and heavy. Stay tuned for wiser and less-yappy folk.