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.