Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

F.A.Q. Sticky

A topic by Kronbits created Jan 22, 2017 Views: 463
Viewing posts 1 to 1
(36 edits)

During this FAQ you will find some external links to Babylon.js tutorials. They are the official docs used for native code but on they also explain how is used each parameter much better and in depth to give an idea how manage in Babylon3D.



Added a NewMesh but not appears

Case 1: Look if the Scene and NewMesh added have the same ID.

Case 2: Be sure you have at least one light in the scene. Set it to "Hemispheric" and intensity=1 in case all is too dark to see the objects.


Can't upload to the scirra arcade

Solution: Change the extension of scene.babylon imported file to Scene.js for example.


The camera collides too near of the objects

Use "Set camera ellipsoid" to avoid that. Change the values of X,Z to edit the camera collision. Babylon.js camera.


The camera is too small or big

Use "Set camera ellipsoid" to change the Y value to adjust to your scale level.


Wasting much time on trial&error

Debug is your friend. In the scene options on the left you can see a "Debug : False". Change it to TRUE and run the project.

Now in the right side of the runtime you will see lots of parameters for mesh, lights,etc... Be curious! you can modify anything on the scene!. You can see the collision boxes, name of each object in the scene, turn on-off lights, setup your lights in realtime to set this values in the C2 properties or events,etc... instead of change a value in events and run the app again and again.


Babylon3D mouse lock not works correctly

Yes, is not a real or complete mouse lock. To achieve a full mouse lock use the TiAM MouseLock 0.5 Plugin . Have a small error in the code, to fix it use the McKack fix. (Contact with him to update it or upload my fixed version)


Confused with native gravity, physics gravity...

Native scene gravity is for the camera and is constant, i mean, always applies the same gravity, if you fall you will do always at the same speed, if you want a real gravity for the camera you will have to achieve it using events.

Physics gravity is for mesh objects when they have the "Physics Behaviour" added.


With physics my objects falls to the infinite

Be sure your objects are over a plane with "Physics behaviour" too. Mesh objects only collides with others when they have physics. To prevent it from falling set the object mass to 0 in their physics behaviour.


Shadows makes my meshes looks striped-weird

Try to set "receive shadow" to false or play with the light that is casting shadows changing the mode their are applied or the size of the texture map size. Remember tha maximun shadow map size is 4096, more than that the shadows not will appear.


Skybox not appears (+Info)

Case 1: Your skybox size is to big and is off the camera render vision.

Case 2: Be sure you not have the fog activated with an high values.

Case 3: You wrote the image filenames wrong. If you import Skybox_XY.png, Skybox_XZ, etc... remember you only have to set "Skybox" in the "Skybox name:". The plugin will get the others from the imported files.


Added the fog but nothing happens (+Info)

Play with the values: Fog Start | Fog end | Fog Density. Depending of your scene scale you will need one or other values. Set the Debug to true in the scene properties and try to change the values in runtime to see what is the problem. For example Fog Start=0, Fog End=1000 , Fog Density 0.005. Also Remember Fog Start/End only works on Linear mode.


My mesh not have reflection

Configure the reflection can be tricky. Again set Debug=True and play with the values until fits with your needs. If you are looking a good reflection with the best perfomance i recommend you use a Reflection Texture. Reflection Probes | Materials

---