coolroar Posted October 3, 2018 Share Posted October 3, 2018 Hey Phuein, awsome! To better understand what's going on, I added celestial compass to a new version of the above PG: https://www.babylonjs-playground.com/index.html#7MNJ8A Also set camera.fov = 2; for a wider view. Here is similar using UniversalCamera: https://www.babylonjs-playground.com/index.html#2UFUC3#9 I worry that if you are successful implementing immediate roll correction, it will be practically the same as universalCamera. I hope I'm wrong and that you can make it happen, 'cause I've given up on it. Admire your persistence and agility on github. ? ☘️ Phuein 1 Quote Link to comment Share on other sites More sharing options...
Phuein Posted October 5, 2018 Author Share Posted October 5, 2018 Cool deltakosh, I'll add to my notes to make a proper PG example for the docs. coolroar, why do you think UniversalCamera will be so similar to FlyCamera with immediate roll correction? Maybe it's better explained with your example of Pitching your head straight up (look at ceiling) and then Yawing your head to the side - thus seeing the world in a 90° Roll. If you only Yaw for 45°, your head automatically fixes the Roll by 45°. It eventually reaches 0° when your Yaw is complete at 90°. And with the added benefit of actual space and air flight integrated, I'm sure the goals are different enough to justify it (until an unexpected singularity!) Quote Link to comment Share on other sites More sharing options...
coolroar Posted October 6, 2018 Share Posted October 6, 2018 ... Because https://www.babylonjs-playground.com/index.html#2M2LCV see lines 108, 109 (instantaneous roll correction I dreamed up last night). Compare with https://www.babylonjs-playground.com/index.html#PFC6AM just works on UniversalCamera.rotation. This seems to make auto roll correction moot. [sorry ? ] But all this is just preliminaries for much grander goals: Epic Space Game! ? Right? Quote Link to comment Share on other sites More sharing options...
Phuein Posted October 8, 2018 Author Share Posted October 8, 2018 I don't get it... You just locked an axis. Using right/left arrow keys (per the instructions) doesn't roll. I don't want to lock an axis, as that doesn't represent free 3D movement. I'm not sure where we reached a misunderstanding. I wish somebody bothered to make a Cosmic Rift (SubSpace-esque) clone. For myself, I just enjoy going into the details. My project only has space movement as a small element. Quote Link to comment Share on other sites More sharing options...
coolroar Posted October 8, 2018 Share Posted October 8, 2018 " ...Using right/left arrow keys (per the instructions)..." Oops, did not intend to leave in the roll control. My understanding: you want to be able to steer the ship in any direction away from straight ahead using yaw and pitch and have the consequential roll cancelled. [right?] That is what the PG does: https://www.babylonjs-playground.com/index.html#2M2LCV It does the pitch and yaw and has resulting roll (relative to World) zeroed (lines 108, 109). My understanding of "...auto roll control..." is that the roll is undesirable, so after yaw and pitch I zero the roll. If my understanding is correct but my solution doesn't produce the expected effect, then ... /// Well, more later, need sleep... Quote Link to comment Share on other sites More sharing options...
Phuein Posted October 11, 2018 Author Share Posted October 11, 2018 No, that isn't the aim. At its core, the desired goal is a "ghost in space." Not a spaceship. The spaceship option is secondary, and also more simple. A ghost in space would function like a human, with certain rules for roll-correction. Roll is definitely desirable. It just gets tweaked as you look around, similarly to how humans do it; attempting to maintain roll within certain boundaries to some extent. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.