-
Posts
482 -
Joined
-
Last visited
-
Days Won
9
Everything posted by joshcamas
-
Hello friends When attaching to a mesh, babylon's GUI scale and ratio is dependent on the mesh's ratio. This is fine, unless you have a dynamic GUI in which you don't know the exact ratio of the GUI you'll be building. This causes issues: https://www.babylonjs-playground.com/#0U0RKU#2 My idea is to dynamically scale the mesh after the GUI is finished - by defining either the width or the height of the mesh, and then calculate the corresponding height or width depending on the GUI's aspect ratio. Problem is, I can't seem to find this aspect ratio. I've tried grabbing the dimensions of the root container, but they return 0. Also, the AdvancedDynamicTexture's resolution is defined before the GUI can be created, thus creating another aspect ratio problem Any thoughts? I feel like I'm missing an obvious solution here xD Josh
-
Interesting, I'll look into this. Thank you
-
Hello friends I can't seem to get labels working in 3D GUI. I can get them attached to a button, but I don't need a button xD I need a label Is there a way to get a 3d button with just the "content" feature, with no actual button graphic / interaction? Thanks! Josh
-
Alrighty, I believe I found the bug In gearVRController.ts, the button map is: private readonly _buttonIndexToObservableNameMap = [ 'onTrackpadChangedObservable', // Trackpad 'onTriggerStateChangedObservable' // Trigger ]; However, the observable "onTrackpadChangedObservable" doesn't exist, it should be "onPadStateChangedObservable". Changing the mapping to this seems to fix the issue
-
Hello friends For some reason, I cannot for the life of me figure out how to get the "pad button" detection for my GearVR. I've tried onPadStateChangedObservable, onSecondaryButtonStateChangedObservable, and onMainButtonStateChangedObservable. None of these seem to ever trigger It's strange since onTriggerStateChangedObservable works for me - the trigger button does its thing Is this a bug? Or am I crazy? XD Josh
-
Hello friends I am visiting Babylon once again for a lil bit, and have an issue. Seems like no matter what I do, the function VertexData.CreateGroundFromHeightMap always returns an empty vertex data. The documentation is sort of unclear of what the buffer input is supposed to be - it says " buffer the array holding the image color data ", which sounds like it could be an array of rgba's, (sort of like canvas image data), but it also could mean rgb... but honestly both of those sound very strange, since a heightmap is greyscale, so it would make sense if it was simply an array of heights... but I'm assuming not since it says "image color data". How does this work? Thanks! Josh
-
Yup, this is exactly what you need to do! Interestingly enough, this is how most engines do it, such as Unity and UE4. This was what I wanted to do years ago with my editor, but back then we didn't have that nice terrainMaterial, so beautiful <3
-
I don't remember having a gif avatar, sadly
-
SpriteGen (Build Spritesheets out of Models!)
joshcamas replied to joshcamas's topic in Demos and Projects
Sorry about the super late reply! I'm afraid I have moved on from the HTML5 scene for now, I may return. I'm currently working on a big project with Unity. I can release the source files, if you want to see how it works, it's actually quite simple -
Awesome! I'm so excited to get into this! With cardboard, you can scan a code to load headset parameters... My headset isn't aligned with the default babylon/webvr settings, are there variables I can change on my own? It'd be really cool if there was a database, and we could implement a camera taking a picture of it, scanning the qr code, accessing the database, and setting the webvr settings... but for now I just wanna hardcode in those settings
-
Hey guys, I'm looking for a downloadable vr example... no 2D gui, nothing like that.... all I want is a flat plane. I'm having trouble finding anything like this, it's sad cause all I can find is three.js examples I don't wanna use three.js Anything like this out there? Also, does webvr in babylon support webvr-polyfill?
-
How does dynamic-on-dynamic collision work?
joshcamas replied to joshcamas's topic in Questions & Answers
LOL well luckily this physics engine is going to be very simple. Think AABB based intersections and simple calculations. So rotation is not going to be a thing, nor friction, nor ramps, for now at least. For now I'm thinking just using 50%, then maybe adding mass proportion later. Thanks guys :)) -
I'm currently working on my AABB collision system, and I've gotten dynamic-static collision working, aka a character on a wall for example Basically by comparing the overlap of two bounding boxes and pushing the dynamic one away... But how should I do dynamic-dynamic? Should I basically run the thing twice, but move each one a percentage depending on mass? Aka if both weigh the same then move the same distance apart, or if one's heavier then move it less? Should I compare just mass, or velocity, or... Here's what I've done so far:
-
This is brilliant! I hope someone can come up with a non-minecraft clone of a voxel game... the voxel system seems so cool but it feels like no matter what you do with it it looks like a minecraft clone
- 15 replies
-
- babylon.js
- voxel
-
(and 2 more)
Tagged with:
-
Alright, we're getting there! Simple collision works!! http://www.babylonjs-playground.com/#1BVXYE#25 How it works: The collision system is currently static vs dynamic, aka a character vs a wall. This is done by enabling static collision and dynamic collision by collision group. This allows different objects to collide to different objects. staticMesh.enableStaticCollision("world",scene); dynamicMesh.enableDynamicCollision("world",scene) Adds both a static and dynamic mesh to the collision group "world". And now to update the collision system, simply run: scene.updateCollision() In your update loop. The next step is a dynamic+dynamic collision, although I'm not quite sure how I'll design that. Also, maybe different shapes, as well as custom bounding boxes. (instead of using the bounds built into the mesh. It'd also be interesting to implement bouncing and other simple physics stuff I'm also considering adding a simple bounding box visual system, and *maybe* add higher end collision (rotation affects collision)
-
This is a pretty awesome little guy! I love the atmosphere, the menu is a great touch! Adding traps would be rad
-
I do too! Only problem is it isn't my art, it's free art off open game art. And when I add more characters (if I continue this game) I need it to be the same style
-
I'm not sure why the mouse isn't working, that's crazy cause I didn't change anything, it worked a month ago... thanks for finding the movement bug as well!
-
Hi guys, I'm building a little isometric demo and I'm in need to hide meshes that the player is behind. I don't really wanna hide the whole mesh like Diablo, but instead want to create a circle mask around the player. Like so: Notice how the wall dissapears when the player gets close? Sorry about the bad quality lmaoo So yeah. Not 100% sure how this would even work...
-
That's what I'm thinking! But it *shouldn't* do this, because it moves it by the distance... (delta). But I'll check it out, thanks!
-
Dude I love it! What is facet data? I'm getting a solid 60 fps as well EDIT: Clearly you're the master of this, do you know why my code is glitching? http://www.babylonjs-playground.com/#1BVXYE#18
-
haha awesome! I like the idea of specific lightweight "physics engines". The concave shape idea sounds really interesting as well! Glad to see other coders interested in this sort of jazz!
-
MWAAHAHAHAHAHHA IT WORKS http://www.babylonjs-playground.com/#1BVXYE#12 Now I need to implement the calculated positions... AT LEAST WE HAVE PROGRESS MWAHAHAHA EDIT: Alright, some progress. Kinda works? http://www.babylonjs-playground.com/#1BVXYE#18
-
Hmmm problem is I'm trying to find the bounding box that reacts to rotations of meshes. See how the plane is rotated? Theres that wireframe mesh that's supposed to visualize the bounding box I'm trying to get. Extend size doesn't seem to do this. I print the object's extend size's z, and it prints 0 for the plane (incorrect) and 1 for the sphere (correct) EDIT: HOLY CRAP IT WORKS! http://www.babylonjs-playground.com/#1BVXYE#12 I was using minimum world bounds incorrectly, turns out it works