Babylon3D: Standard Edition

From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • I was testing the collisions to do when camera or another object collides with other = destroy mesh but i was unable to get it, or not works or i get an error, this one:

    When i try to destroy a NewMesh (No matter how)

    (For example on press X > destroy NewMesh)

    When i try On NewMesh intersects with an OBJ-Mesh, or OBJ-Mesh intersects with another OBJ-Mesh nothing happens, The New/OBJ Mesh stops in their mass center, so detects the collision but the mesh is not destroyed.

    What i'm missing?

    I saw your examples but the Platformer and the Racer have C2 collisions, and the FPS the unique collision is the camera with a wall but without interact/destroy that mesh.

  • Damn more errors

    OBJ mesh on intersect with a point and giving the other OBJ mesh X/Y/Z position (MeshPosX,MeshPosY,MeshPosZ). Also trying to get the center point of the mesh or absolute position,etc...

    I'm trying all the possible ways that comes to my mind to when an object collides with other(Using babylon events) and or not works or get a new error.

    I'm going to leave the collisions and try again the movement thing to see if i can fix the FreeCamera.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • matriax Does your OBJ model have physics behavior ?

  • X3M Tried both objects or only one of them with the babylon3D physics behaviour added and without physics, always with the same result and other errors:

    They need the Physics behaviour to detect the collision and interact?

    Other tests:

    If i press X and set destroy NewMesh get an error. On OBJ-MESH the mesh is destroyed without problems on press a key. On mesh picked with the mouse the NewMesh object is destroyed on OBJ-Mesh no.

  • X3M Edit, no matter the physics behaviour, seems to destroy the mesh only works when is the first in the condition not the one who receive the collision. ¿?

    I mean:

    This works, but if i try to destroy the other get the error.

    I always tried to destroy the second mesh. i mean, when a bullet collides with the enemy > Destroy enemy. But only works if i set If enemy collides with a bullet > Destroy enemy. Is a bit weird, but now is working.

    In C2 the collision works in Both ways. In fact in C2 also you can set: If Mesh1 collides with Mes2 > Destroy Mesh3.. But in babylon only works with Mesh1.

    -

    EDIT: In case Of collision of Mesh1 and Mesh2 if i try to destroy a Mesh3 this is the error(Same for OBJ-Mesh):

  • X3M Tested better the collision, destroy mesh and other things and glad now it works with duplicates and families, this make the work lots easier. BTW, If for the new update you can add the possibility to destroy any Mesh at the intersect condition will be great. Looks like on interesct condition the first mesh is prepared for something but when you try to destroy/interact with another turns crazy or something.

    Also there is no way to do: When camera collides with a mesh > destroy the mesh . Or at least i was unable to do it.

    ---

    Back to the camera thing, what happens to the TargetCamera? I'm doing some wrong or the Target Camera is a real bug?

    I'm going to try fix the FreeCamera Y, now that i know takes the Yrotation in consideration if not i will pass to other things.

  • matriax I need a simple recreation of the bug if you don't mind, just a small capx. Or tell me how I can reproduce it.

  • X3M I simply open your FPS template, change the FreeCamera by Target Camera and get the error. just that. i told you in the other post, here the image of the error:

  • matriax Target camera does not have an ellipsoid. Each camera has its own parameters.

  • matriax Target camera does not have an ellipsoid. Each camera has its own parameters.

    And how can we know that? In the description camera will be great some advices like that, or simply make Babylon not take in consideration the ellipsoid when Target Camera is added to avoid the error.

    BTW, the TargetCamera was for fix the FreeCamera problem when you fly, but with target camera seems we have to build our own controls for movement and camera rotation(for mouse). And also, without ellipsoid how the camera check the collisions? Also the gravity not works with targetCamera...

    So, in my opinion better find a solution/fix for the FreeCamera to avoid fly, instead of build from 0 all the behaviour in Target Camera.

    Any ideas?, Maybe by code in the plugin some action in the camera to switch if the FreeCamera take or not the Y.rotation in consideration? So if deactivated you walk etc... and with that active you can fly or use it as a "JetPack behaviour".

    ---

    Other thing i'm wondering is, will be possible add in the plugin some action to use native Babylon.js code? So i can ask in the Babylon.js forum for a solutions and paste it on the events. Maybe is something impossible, just asking.

    EDIT

    For example i searched in their forums how to solve the problem and found this:

    http://www.html5gamedevs.com/topic/1881 ... p-or-down/

    So with an event to use native Babylon.js code i can try that solutions in case i can't fix myself with the babylon3D plugin.

  • matriax You can already execute BabylonJS code in C2, I'll post a tutorial on youtube later.

  • matriax You can already execute BabylonJS code in C2, I'll post a tutorial on youtube later.

    X3M WHAT? XD , where is the action? how i miss that! :O , Was announced in an old post or something? I'm trying to see but in the Store page still appears the 0.5 as last features and in the first page here in the forums i can't see nothing like that.

    ---

    EDIT:

    I can't find nothing, so maybe the way to add babylon.js is a bit tricky?

    When you say execute Babylon.js code you mean adding it in the C2 events or by editing external things like the .js? Maybe "Set from JSON", using "execute javascript" or loaded by a .babylon scene file?... Waiting for that tutorial!

  • I think i know how have to be done, using function with the browser plugin to "execute javascript" ? .

    So i guess we will have to import the Babylon.js to our project and call the babylon.js functions with the "execute javascript" action of the Browser plugin.

    Still don't know how exactly have to be done, some dropbox examples i found are missing, but if you can provide a youtube tutorial and the .capx file showing with some events calling functions for scene, camera,etc.... will be awesome! .

    ---

    X3M In this Babylon.js or Babylon3D seems there is some automatic optimization when detects some framedrops that makes the render some pixelated. For example if i'm running the NW.JS and i do another thing that can make the render slow that cause for X seconds a frame rate under 45 FPS(or something like that) automatically babylon set a 2x pixelation, and if continues a 3x, or 4x....

    Is there anyway to deactivate that?

  • matriax There is no automatic optimization unless you assigned the Scene Optimizer behavior to the scene.

  • matriax There is no automatic optimization unless you assigned the Scene Optimizer behavior to the scene.

    Oh you're right! Seems i added that in the old versions and forgot it :S .

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)