Jump to content

Cameras Discussion - Inputs Incongruity


Phuein
 Share

Recommended Posts

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.

? ☘️

Link to comment
Share on other sites

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°. :D 

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!)

 

Image result for roll pitch yaw

 

Link to comment
Share on other sites

... 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?

Link to comment
Share on other sites

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. :D

I wish somebody bothered to make a Cosmic Rift (SubSpace-esque) clone. :P For myself, I just enjoy going into the details. My project only has space movement as a small element.

Link to comment
Share on other sites

" ...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...

 

 

Link to comment
Share on other sites

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. :) 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...