matriax's Recent Forum Activity

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

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

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

  • I can't set a TargetCamera when i do get this error:

    I tried to set the targetCamera in your FPS to see if was my code and the same error .

    BTW, i tried what you said on FreeCamera and yes when i press a key the camera moves in that direction but in a weird way, i guess because is a FreeCamera.Maybe with that i can fix it for the freeCamera, i will try tomorrow.

    Edit: If you say takes the camera rotation of the player in consideration maybe when we press forward(W) on Freecamera is add some (-Y rotation) coordinates or similar to respect the controls? More things to try.

  • Trying to achieve another thing that i though was more easy...

    If you aim the sky and go forward(W) you can fly or go up, in the same way if you look at the floor and go backwards(S) you can fly or go up.

    I tried to do some fixes but nothing worked. I simply want that when i press W to go forward the camera moves forward over the floor without matter if is aiming the sky. And if i look the floor and press S i want to go backwars no UP.

    I guess maybe the set controls to camera is not what i need here, so i tried with "set position", "translate by" and "translate by ease" but can't get it to move correctly. The one that detect colisions is the "translate by ease", but i can't figure how to set that when i press the key goes to the direction in front the camera not the world axis. I tried the FrontCamera expresions and others like Camera.DirectionX but always is a mess. Also tried that when i press W fix the y position to avoid flying but nothing working 100% fine.

    Is there any solution for this X3M ? I willleave at the moment, I'm going to test other things like jump, crouch,etc....

  • X3M Not really, first the idea is do some kind of template/Engine for FPS, with all the basic parameters added and all working with camera, fog, gravity,etc.. to be easy to use.

    After that will see, but yes for a first try some lowpoly/res game in 8bits with C2 shaders i think can look really cool. Something like Cube Rampage on all are basic shapes but with effects and other techniques give it a cool touch. For that the thing about deactivate anisoptric filtering, nearest instead of bilinear sampling mode,etc... to have sharp pixels.

  • Ohhh i think i fake it the Camera real gravity .

    Still a bit dirty but is working. I'm going to test it all better....

  • matriax The camera uses a native physics engine, it does not use Oimo or Cannon. The native engine doesn't mimic real life physics at 100%.

    Then how i make the gravity of the camera real? MMm maybe some event with a local variable that if camera is not colliding with nothing adds 0.1 of gravity each 0.1 seconds and when collide to something set to 0 ?

    Or maybe there is an expresion that can be added to the Y gravity like "(-9.81*Seconds)/Variable" to fake it?

    Any ideas?

    Edit: Well i already fake it the falling gravity. But now i need some check when the camera is not colliding with nothing. Mmm

  • Why the gravity is constant? I mean i set -9.8 in various sites and in all the same effect, you fall constantly at 9.81 speed or whatever, when in theory you have to fall every time more faster.

    In theory is -9.8 every second(or m/s o something like that), but in the moment there is nothing under your feets the -9.81 is applied, instead of start with 0 and increase 9.8 each second. (I'm talking of memory).

    How can i achieve that? In camera only appear "apply gravity" and in physics like oimo,etc... i set -9.8 with the same result as "scene native gravity",etc... ¿?

    And I guess this also can improve the climb stairs/ramp actions and avoid the "earthquake" effect because instead of 0 or 9.8 gravity will apply 0 and increasing from 0 to whatever.

  • X3M I'm with the stairs/ramp problem again.

    The unique solution is use a bigger scene scale? For the actual scene i'm using a camera ellipsoid of 8,10,8 but some stairs still do some "eartquake" effect when try to go over them and the ramp push me to down.

    Only when the ellipsoid Y is over 50 the ramp stops to push me down,etc... that i guess is how i solved the last time, in blender export or select all and scale all the scene much bigger.

    I tried to set the ellipsoid collision of some objects to 0 but still not works or maybe that funcion is deprecated i don't know.

    So i guess i will have to export the cube again in a x5 scale or do it 5 time bigger to set the elipsoid Y on 50. In your FPS example the camera ellipsoid is "1,30,1" so i guess this is the way to do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • X3M Ah i see! no problem as you said all are just minor things.

    I changed it but not worked correctly, no sets the exact rotation, just by some decimates. I add 90, 180,etc... but not looks correct, with the previous conversion worked perfect.

    I set 90 degress, but in the render i used the debug and to be correct have to be set at 89.5 . So maybe there is an error in that conversion code?

    BTW, i will back to the previous expresion with a note that have to be changed for the next babylon update.

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies