X3M's Recent Forum Activity

  • matriax I'm posting an update soon.

    newt lol, its like captives who haven't been fed for days and then Ashley the prison keeper passes by the cells and throws some bones at them.

  • matriax Fixed , between it should be mesh27 and not Cylinder27

  • matriax No they are the same, you simply execute the function with Browser->Execute javascript.

    I will give you all the parameters you will need, although I'll post a video tutorial on my youtube channel after my basic tutorials :

    The scene object:

    this.runtime.scenes[ID]

    ID: Is the scene ID you set in C2.

    Example:

    Browser  |Execute javascript "this.runtime.scenes[0].clearColor.r = 255;"[/code:1haseumt]
    [b]Explanation:[/b] Change the scene 0 red color to 255.
    
    [b][h2]The mesh object:[/h2][/b]
    this.runtime.scenes[ID].getMeshByName("&"'mesh"+UID)
    [b]UID:[/b] Is the mesh UID.
    [b]Example:[/b][code:1haseumt]Browser  |Execute javascript "this.runtime.scenes[0].getMeshByName("&"'mesh3'"&").visiblity = 0.5;"[/code:1haseumt]
    [b]Explanation:[/b] Set the opacity of the mesh with UID 1 to 0.5
    
    [b][h2]The light object:[/h2][/b]
    this.runtime.scenes[ID].getLightByName("&"'light"+UID)
    [b]UID:[/b] Is the mesh UID.
    [b]Example:[/b][code:1haseumt]Browser  |Execute javascript "this.runtime.scenes[0].getLightByName("&"'light4'"&").intensity= 0.0;"[/code:1haseumt]
    [b]Explanation:[/b] Set the intensity of the light with UID 4 to 0.0
    
    [b][h2]The camera object:[/h2][/b]
    this.runtime.scenes[ID].getCameraByName(name)
    [b]name:[/b] Is the name you have given to the camera in the left properties tab (Property above scene ID )
    [b]Example:[/b][code:1haseumt]Browser  |Execute javascript "this.runtime.scenes[0].getCameraByName("&"'myCamera'"&").position += 1.0;"[/code:1haseumt]
    [b]Explanation:[/b] Move the camera named myCamera by 1 on the X axis
    
    Visit [url=http://www.babylonjs-playground.com/#]the BabylonJS playground[/url] to experiment with your code
  • matriax There is no automatic optimization unless you assigned the Scene Optimizer behavior to the scene.

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

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Icons and splash screens are not mandatory, at least for me when I'm building my JS games for testing purposes.

    You should only fill them when you're going to publish your stuff online.

  • Dude, you set the game's first layout to "Layout 1", which is a prototype I guess, you're just confused, delete the Layout 1 and Event sheet 1.

  • matriax Does your OBJ model have physics behavior ?

  • The camera is meant to be moving freely if you don't activate physics, hence the name Freecamera. These are things that are normal and that were made by the BabylonJS devs.

    A Freecamera goes forward when you press W and backwards if you press S, it takes under consideration the rotation of the player.

    So if you wanna make your own settings, then I recommend you change to Targetcamera instead of Freecamera, that way the camera behavior won't interfere with your settings and controls.

    On keypress W:

    Set camera position to (Camera.FrontXPos(1),Camera.FrontYPos(1),Camera.FrontZPos(1))

    On keypress S:

    Set camera position to (Camera.FrontXPos(-1),Camera.FrontYPos(-1),Camera.FrontZPos(-1))

X3M's avatar

X3M

Member since 8 Jul, 2016

Twitter
X3M has 1 followers

Trophy Case

  • 8-Year Club
  • Coach One of your tutorials has over 1,000 readers

Progress

9/44
How to earn trophies