Babylon3D: Standard Edition

From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • X3M Is it possible to implement Raycast?

    So you would not have to create an object for each bullet, simply a sprite where the lightning strike, similar to how it is used in Unity.

    MATAGUIRIS And if i want to do a bazooka launching misiles?

    BTW, this is a good example that how create/clone/duplicates or whatever in Babylon3D on they need to have the same behaviour to move and actions for all them to collide. I mean different Bullets againts different mesh objects on they have assigned behaviours and actions.

    For sprite.objects is easy, simply on press X > Hero-Spawn bullet & set angle of motion=Player.Angle. After that when bullet collides with an EnemyFamily = Destroy Bullet and EnemyFamily. After that you simply add the different enemies to the family and you can put 20 in the level or whatever and all will works.

    Because C2 on create/spawn an object create duplicates(Other instance with the same name) not a clone(Different name and instance).

  • matriax I'll figure out a way how to make a bullet behavior

    MATAGUIRIS You can already use raycasting

    They are used as expressions to either return the mesh name which intersects with the ray, or the x y z position of the intersaction point between the ray and a mesh.

    Here in the example, A ray is casted downwards from 0,20,0.

    It is casted vertically because I chose the Y axis (0,1,0), its downwards because its 1 and not -1, if I chose -1 the ray will go upwards.

    So if there is a mesh under the position 0,20,0. The game will tell you its name and the contact point.

    matriax Yep thing will be done the right way in 0.6, I just need time to make everything set.

    Now work rate is at 200% and things are done quicker since I switched to VS code that gives codehinting (At least for Typescript) , (Props to fuego96 for recommending me the software)

  • X3M Oh raycasting! I don't know this was already added, i was looking in the Mesh expresions, seems the Scene expresions have some things interesting too.

    About do the things correctly sounds promising, then waiting for the 0.6

  • Hi,

    can one minify scripts including this plugin?

    Thanks!

  • Hi,

    can one minify scripts including this plugin?

    Thanks!

    Yep

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bought this Plugin. It seems really cool and powerful, great work! : )

    However, I encountered this problem....i imported a obj mesh and i applied a diffuse texture...when i launch the preview with NW.js it gives me this error "cannot set property 'diffuseTexture' of undefined babylonOBJ_plugin.js, line 1135 (col 27)"....only when i apply texture....i have version 240 and the last nw.JS...

  • Bought this Plugin. It seems really cool and powerful, great work! : )

    However, I encountered this problem....i imported a obj mesh and i applied a diffuse texture...when i launch the preview with NW.js it gives me this error "cannot set property 'diffuseTexture' of undefined babylonOBJ_plugin.js, line 1135 (col 27)"....only when i apply texture....i have version 240 and the last nw.JS...

    You dont need to apply anything to the .obj file, it already comes with a .mtl file which holds all information of diffuse textures.

    So you only have to import : the .obj , .mtl and images files

    The library will take care of everything.

    Here is an example of a car model that I've downloaded from the Internet :

    Most 3D models websites when it comes to free stuff do not provide good quality obj models, and they often can be missing some image files, so here are some good websites where you can download well made obj files :

    1- https://www.cgtrader.com

    2- https://www.models-resource.com

  • Ok, the obj file is a 3d map i made, i'll import the corresponding mtl file and texture in the library. Thanks for the quick reply and the support!

  • matriax I'll figure out a way how to make a bullet behavior

    MATAGUIRIS You can already use raycasting

    They are used as expressions to either return the mesh name which intersects with the ray, or the x y z position of the intersaction point between the ray and a mesh.

    Here in the example, A ray is casted downwards from 0,20,0.

    It is casted vertically because I chose the Y axis (0,1,0), its downwards because its 1 and not -1, if I chose -1 the ray will go upwards.

    So if there is a mesh under the position 0,20,0. The game will tell you its name and the contact point.

    matriax Yep thing will be done the right way in 0.6, I just need time to make everything set.

    Now work rate is at 200% and things are done quicker since I switched to VS code that gives codehinting (At least for Typescript) , (Props to fuego96 for recommending me the software)

    Can you add an example to throw a ray in front of where the free camera is looking?

    I can not make it work

  • Here is a capx which explains two methods , one using Raycast and the other using Intersection.

    You know whats cool? That you are able to get the exact contact point with Raycasting, this will come useful when I will implement Decals in the future. You know, bullet-holes and stuff...

  • X3M Mmm not works for me, tested on NW.JS and browsers and this is how looks:

    The laser is always in that position. What can be?

    Also in my FPS tests to launch bullets happens the same, the bullets are launched to the left instead in front the camera.

    In this .capx i not edit nothing, simply open and run and this is the result. I tried also desactivate one of the methods but the same none works.

  • I have the same problem as

    I get the cross line XD

  • X3M, Confirming same raycast issue as with MATAGUIRIS and matriax

  • Change it to 1000,0.5,0.5

    Anyway you should get the point how they work

  • Change it to 1000,0.5,0.5

    Changed the "direction" of the laser, but, it appears the laser mesh'es Y position was simply too low. Changing the laser mesh position to (0,50,0) worked for me (just how did it ever work for you???)

    And on to a different subject, by the way, can you implement ShaderMaterial ? I can't wait to use some from Shadertoy

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