Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Phuein

  1. I won't redo the entire docs for BJS. Only wanting to add a feature. I'll let the veteran developers decide if they want to redo it. I do agree with you that it should be done.
  2. I gave up on this idea for the time, yes. Nobody responded with a solution for adding Handlebars Helper functions, which is where I draw my line of bothering with this broken system. (Not being able to add simple JS to a webpage after hours of work means it's broken.) I'm not following you. How is anything you're saying solving this issue? Why do I need to parse BJS for this? Can you provide code that helps with the actual issue? I definitely don't want to write my own TypeDoc, that would be a waste of my time. I was looking to add a very small and simple letter-index to the existing docs
  3. 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.
  4. 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.
  5. 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 ar
  6. FlyCamera as first draft is getting merged, so everyone can see and edit and suggest. https://github.com/BabylonJS/Babylon.js/pull/5286 https://github.com/BabylonJS/Babylon.js/tree/master/src/Cameras (notice "fly" prefix.) It doesn't have inertia yet. It doesn't have Touch controls support yet. I'm back into my own project for the moment, so I'm still stumped with immediate Roll correction (mimic human head) too. Taking a break tends to help. You can make a PR, or post code suggestions here that I'll edit and integrate. 👻
  7. Roll correction and [non-physical] banking seem to work nicely. I still have no idea on how to figure out human-like Roll correction. Hopefully, more experienced coders can provide their input. [Link removed. FlyCamera is now available in BJS for experimenting.]
  8. UniversalCamera is just an added layer on top of FreeCamera that draws from the same MouseInput file. So it doesn't do that. I'm still experimenting, but still very stumped. I can't figure out how to produce mathematically the relationship between Pitch and Yaw with Roll, so that it fixes itself in the given conditions (as described above.)
  9. Agreed about having an option for banking/air-density. Also, an option to mimic a spaceship's momentum in space is valid, as well. However, I find myself stumped at figuring out how to add the [option for] Roll-correction (maintain Roll when Yawing and Pitching.) Boosting up my reading on Quaternions, but it's still not clear to me. Just like our heads do, the default for FlyCamera is to enable Roll-correction, so when users move around (like a ghost!) their view of the world only Rolls when they choose it to do so. Without locking them when Pitching at 90°! The logic would be:
  10. I'll mark this topic as solved, and direct any followup to the other topic, which builds on this. 👌
  11. PHEW Yikes. Your Imagine example is excellent! I've had trouble struggling to comprehend this issue in 3D rotations. Look up. Immediately look left. Yup, no roll but looks like a roll. Okay, so the FlyCamera needs to mimic how humans maintain global Roll, when looking around. No Roll unless Rolled.
  12. Hah, already responded to you on the 3D Camera topic, as well. The goal isn't a locked camera. So no locking any axis. And why do you get a roll from doing yaw and pitch? I can take an object and apply yaw and pitch without it rolling.
  13. "Loses the straight angle" means it has an unwanted roll. Why do you get a roll from yaw and pitch? You can take an object and yaw and pitch it without any roll.
  14. [Link removed. FlyCamera is now available in BJS for experimenting.] So, I've setup the new FlyCamera. I've put in two suggested methods of rotating and started testing. The first, which takes from the engine, seems broken. No Roll, and after turning around and over, the mouse movement is reversed. The second, inspired from the engine and taken from forum user coolroar mostly works, but suffers from a mysterious bug where moving the camera in a circle will slowly Roll it. I brought the whole experiment online and put overrides so it's testable and editable from my playground. 🙂
  15. Wow, that's a cool visualization in that gif! 🤩
  16. Say coolroar, did you notice that your rotation method loses the straight angle when it goes over a certain degree? When implementing your method, I noticed that I get an issue with the camera slowly rolling, when I rotate the camera on X and Y. It doesn't happen in your example - but that's not a free rolling camera either - but it does show when changing the angle enough.
  17. (Pun not intended! I am just that funny.) Wait a second. Why did the OrientationInput use rotationQuaternion, but not the normal MouseInput?? After all, rotationQuaternion works better for moving in 3 axis. (Keeping those options open, eh.) Screenie shows why it seems like FreeCamera doesn't support it.
  18. lol @ Wing Ah, right, the backwards compatibility issue. So it's not a real option anyways now. Well, at least I got some answers. I'll use your Observable trick if it comes down to it. It is a good callback. 👌
  19. That's the most bizarre hack. Literally moving the entire world. No way I'm doing that. When I implement the parenting system I got in mind, if it works, I'll post it here and mark solved. So others can replicate the code.
  20. I see. So, both the new UniversalCamera and its predecessor FreeCamera are really FPSCamera. FreeCamera doesn't have rotationQuaternion in its class, unlike TargetCamera (doesn't extend that part eh), and adding class properties to an input file would break logic. I actually like the InputsManager logic. Then I agree. BABYLON.FlyCamera with its own inputs. It's a shame (on coders) to duplicate some of the movement code (such as some of the keyboard movement), but mixing everything up is a big bad salad, indeed. I'll start working on my fork then, towards a PR. Any input welcome
  21. After figuring out another issue with the docs (adding "Defined in" to API), I felt emboldened to try to figure this feature request once more. So I spent a few hours. TypeScript... TypeDoc... Grunt... Handlebars....... Okay. So, between the code being in TS (which I don't use) and abstracted even further with Handlebars, I can't even perform basic JS operations on the site. Not without creating a further step that adds my JS into the compiled docs pages, which seems like terribly bad practice. <rants> What an abstraction nightmare. Taking something simple like JS and turning i
  22. This is the order in which the cameras (relevant to me) extend each other, but also often override each other: UniversalCamera extends TouchCamera extends FreeCamera extends TargetCamera [extends Camera.] How come FreeCamera doesn't use rotationQauternion and allow rotation around its Z (roll) axis by default? After all, TargetCamera does use quaternions, even though it ignores the Z axis by design. But a FreeCamera should be that much free, right? Wrong? I saw that FreeCamera abstracts its inputs. It would make sense for the mouse input to use quaternions for full freedom of ro
  23. What exactly do you mean by moving the world? I thought you meant just a parent. Has an idea about parenting and unparenting consecutively, to a new empty mesh in location, whenever local distance goes over a certain number; instead of dividing space ahead of time.
  24. Agreed. But why can't I change the default ambientColor property in StandardMaterial without remaking/workarounds? Something akin to: BABYLON.StandardMaterial.prototype.ambientColor = new BABYLON.Color3(1, 1, 1) An override, no need for loops. Why don't the class defaults draw from public variables that can be modified? I noticed this pattern in the engine.
  25. Ah, they're both shaky as heck for me. (1mb vid attached... should I have linked to an imgur gif instead?) So, let's see if I got this straight. The issue is numbers with too many (over float32) digits ("124512541.2512412"), which is - in this case - an issue with being "very far away" from the mesh's parent position (axis.) So, if I use parents for different "areas", I can keep movement cut into zones, which keep the numbers low? i.e. rookie numbers. Is that right? I'm still not sure how I would move my mesh these distances this way. I'd need... err... a matrix of paren
  • Create New...