• Content Count

  • Joined

  • Last visited

  1. Exactly what I was looking for. Thank you very much!
  2. I have another question that may lend itself to being a handy search result for future users. I would like to know about the performance differences between the stated mesh rendering techniques, and whether or not it is worth it for certain situations. TL;DR: What is the performance difference between GPU instances and Mesh clones? Do mesh clones have a noticeable performance increase over standard individual mesh creation? My individual situation is thus: I have a series of blocks the user can walk on and place at will, that upon placement will never scale, rotate, or move. However, ideally they should be easy to individually destroy and the user should be able to change their color. The latter seemingly invalidates GPU instances, and the former makes batching appear less reasonable. The only other performance option I've found is cloning, which is listed as an alternative to GPU instances on the optimization pages, but doesn't say much beyond that. Is it worth it performance-wise to switch to Mesh.clone, or should I instead just go with single instances as I did previously? Any specific suggestions for performance on my situation in general?
  3. narkro555

    Fire ray from player camera?

    Oh wow how did I not see that. Thank you very much, I hope others who search this query will find this answer too.
  4. Simply put, I would like to fire a ray straight out of the player's view. Sort of if as to fire a bullet down the screen's centered crosshairs, but instead to instantly pick the first mesh the beam hits. I'm bad at vector math, and haven't been able to piece anything together after a lot of experimenting and searching. Could someone lend a hand?
  5. I just gave up and wrote my own gravity and jump script. Not sure why my collision would be glitchy like that when its fine everywhere else, but I'm satisfied with a custom one now. Thanks for all your help anyway.
  6. Sorry again, FPS as in First Person Shooter, like the example project in the last paragraph.
  7. Ack, my bad. I should have been more specific. You need to click the screen and lock the cursor, then you can look down. I've updated the OP again. Very new to this sorry.
  8. That's strange, why is it working in the demo, but not in mine? I just now made a Playground: to maybe help show the point. The demo also has the issue of slowing when you point down.
  9. EDIT: My previous demo might not have been clear; you need to click the screen and lock the cursor, then you can look around. To make this more apparent, I've increased the size of the ground plane. My player object is a FreeCamera with an ellipsoid value of new BABYLON.Vector3(1, 4, 1). The object in question is a cube Mesh created with MeshBuilder.Box with an initial size of (1, 1, 1). Now ideally when the player walks and hits it, the player moves up it like a ramp (and would not do so for taller objects), but I would be fine at the moment if he just stopped smoothly as if he had hit a wall for the moment. However, the current result is that he seems to momentarily move on top of it, then zip back out as if to fix the fact that it had gone inside the bounding box. This results in a "spazzing" back and forth when walking towards this shorter object. The spazzing gets lesser as the cube gets taller, and goes away entirely when the object is at the same height, but it is still a very glaring issue given my plan. What should I do? On a side note, I followed an First Person Shooter tutorial ( to try and get myself started with what was supposed to be an example of good work, but the FreeCamera slows and eventually stops when pointing the view downwards. Can I get some tips on making a baseline FPS movement that works like your standard FPS would? Other examples I've found have this same issue.