matriax's Forum Posts

  • X3M Maybe its me but in this 1.0 version i can't shoot in one direction fixed. In the 0.5 at least achieved in some axis always but in this one after test various things during various days i leave it as impossible.

    So, will be great an example or edit the FPS to with a key launch spheres in front the camera.

  • X3M Mmm, about to make it more easier, is there anyway to show the lights form? Like in the 3D editors, to at least have some reference of what we are doing/editing.

    With the debug enabled i achieved to show the mesh colissions/forms and names:

    Maybe there is some option that can make the lights form/shape visibles? By Babylon code or Debug? That will help a lot. Also we can modify the values of the light in the debug to see in real time how affect that helps a bit.

  • X3M Are the Spotlights working for NewLights?

    I'm using your FPS example to test the lights and the unique i can't get is the Spotlights. I tried to change all the variables and position but nothing happens never. If they are working will be great update the FPS example to show how.

    EDIT: - Finally get the Spotlights working but they are so confusing. I guess for lights better import a scene with the setup made with a 3D editor. BTW, I will try to do something for the light to make a setup in runtime to edit each variable to see in real time what is going on if not this will be imposible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • matriax I'm posting an update soon.

    Great to ear that!.

    ---

    About the Texture.SamplingMode, i opened a thread on Babylon.JS in case you want to take a look to see if you have some idea that how implement something for deactivate filters:

    http://www.html5gamedevs.com/topic/2780 ... r-applied/

  • X3M Seems the Nearest_Sampligmode and anisotropicFiltering is set on each texture. If you provide the action to enable or disable them, if we have a family called "3D_OBJ" i guess we will can do a: For each "3D_OBJ" > Set Nearest | Filtering=1, or whatever, right?

    I tried with the execute javascript but i don't know exactly the code for that, i tried things like this:

    "this.runtime.scenes[0].getMeshByName(""mesh35"").Texture.NEAREST_SAMPLINGMODE);" [/code:3uf4bms9]
    [code:3uf4bms9]"this.runtime.scenes[0].getMeshByName(""mesh35"").Texture.anisotropicFilteringLevel = 1;"[/code:3uf4bms9]
    
    But i guess this is not how it works. I'm looking this playground example:
    [quote:3uf4bms9]http://www.babylonjs-playground.com/#1IKIXK#5
    
    Other example about SamplingMOde:
    [quote:3uf4bms9]http://babylonjs-playground.com/#121HCT#0
    
    
    How i access to the texture functions of a mesh with execute javascript to modify this things? Maybe for this things i have to have in mind the material name of the mesh to change their properties?
  • I'm workin with the Babylon3D plugin and i started doing a FPS template to create my games. Still very alpha but this is a video i recorded today:

    Subscribe to Construct videos now

    Lots of things to do , so will see how ends all this...

    Here the playlist with all the babylon3D stuff i'm doing and i will upload in the future:

    Some related stuff i did on Babylon3D:

  • The "execute javascript" for mesh works, the thing not works is change the visibility of the mesh.

    I tried to change the visibility of a mesh picking by UID using the Babylon3D actions but nothing happens for OBJ-Mesh objects. On NewMesh objects works.

    I tried to erase a mesh picking by UID using the execute javascript and works perfect:

    "this.runtime.scenes[0].getMeshByName(""mesh35"").dispose() ;"[/code:10irrxbk]
    
    Seems the problem is the "visibility" action for OBJ-Mesh ¿?. Or why works on NewMesh and not on OBJ.Mesh?
  • Found this when i tried to parent a NewMesh to the camera:

    ---

    EDIT2 - Y.rotation solved!!

    In the post about avoid the Y.rotation Deltakosh posted this example:

    http://www.babylonjs-playground.com/#GZ1YB

    (thread: http://www.html5gamedevs.com/topic/2774 ... n-on-move/)

    The thing that avoid the Y to fly is this:

        camera._updatePosition = function() {
            this.cameraDirection.y = 0;
            this.position.addInPlace(this.cameraDirection);
        }[/code:3qdr3eei]
    
    In execute javascript seems with only this already works:
    [code:3qdr3eei]"this.runtime.scenes[0].getCameraByName(""camera"").cameraDirection.y = 0;"[/code:3qdr3eei]
    
    This can be done actually with the Babylon3D actions? I tried some of them adding Y to 0 but none worked or this is another expresion? In that case will be great have the DIrections X/Y/Z for the next update with all the other minor fixes with camera degress,etc...
  • X3M Maybe it's me, but i'm trying adjust X/Y/Z coordinates and seems for each action i want to do even for the same plugin they changes.

    I was trying to set a bullet in front of the camera and for clone mesh the X/Z works in a way and for set position in other. In both cases the bullet appears in front the camera but for each action the axis works different?.

  • X3M Waiting the video tutorial to see real examples working :S .

    So seems for the Light and Mesh objects they refer to the UID: Light4, Mesh21,etc... but for the camera uses the mesh name in the left tab, not the C2 name, the one that uses Babylon that appear above "Scene ID".

    I have the Light thing working now, on press I > Light2 to 0.0 intensity and the execute javascript works this:

    "this.runtime.scenes[0].getLightByName(""light2"").intensity= 0.0;"[/code:3f0v4518]
    
    But the mesh still not works. I have NewMesh objects and OBJ-Mesh and tried:
    "this.runtime.scenes[0].getMeshByName("&"'mesh20'"&").visiblity = 0.5;"
    "this.runtime.scenes[0].getMeshByName("&"'mesh24'"&").visiblity = 0.5;"
    "this.runtime.scenes[0].getMeshByName("&"'mesh27'"&").visiblity = 0.5;"
    etc.... But none worked.
    
    The camera seems is detected but when i try to apply your javascript code i get this error:
    [img="https://i.imgsafe.org/e43794988e.png"]
    [code:3f0v4518]"this.runtime.scenes[0].getCameraByName("&"'Camera'"&").position += 1.0;"[/code:3f0v4518]
  • The first example works perfect, the other don't, maybe because they have a "" ?

    Example

    Browser  |Execute javascript "this.runtime.scenes[0].getMeshByName("mesh3").visiblity = 0.5;"[/code:bmh9wjyv]
    
    I created a NewMesh = Cylinder, with Cylinder as object name and mesh name. This Cylinder have UID=27 on C2.
    
    I tried this:
    [code:bmh9wjyv]"this.runtime.scenes[0].getMeshByName(""Cylinder"").visiblity = 0.5;"[/code:bmh9wjyv]
    [code:bmh9wjyv]"this.runtime.scenes[0].getMeshByName(""Cylinder""+27).visiblity = 0.5;"[/code:bmh9wjyv]
    [code:bmh9wjyv]"this.runtime.scenes[0].getMeshByName(""Cylinder""27).visiblity = 0.5;"[/code:bmh9wjyv]
    [code:bmh9wjyv]"this.runtime.scenes[0].getMeshByName(""Cylinder+27"").visiblity = 0.5;"[/code:bmh9wjyv]
    
    But none worked.  I added double "" to get working if not i get an error syntax on C2 expressions. How have to be done correctly? What i'm missing?
  • X3M I posted the FreeCamera problem on the Babylon.js forums here:

    http://www.html5gamedevs.com/topic/2774 ... n-on-move/

    Hope somebody finds a solution or a way to fix it, i tried in all ways i know and never get the behaviour desired, also i want to create some kind of switch to deactivate/activate and use it as Walk/Jetpack.

    ---

    About use babylon.js functions on C2, how optimized/fast will be compared with the babylon3D plugin? I mean, the same function using Babylon3D action or executing Babylon.js functions in events have any difference?

  • 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 .

  • 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 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!