• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D 3D collision question

So i am using this dll for 3D collision: http://gmc.yoyogames.com/index.php?showtopic=632606
I am able to raycast against the "world system" just fine, but when I try to do a raycast with an "collision object" it does not work. I re-read the thread over and over, and it seems like it should work just fine

I can't find any contact information for Venomous, otherwise I would have asked him
I switched over from the P3DC dll because the one that Venomous made was so much faster.

Here is some code

Checking the collision:
Code:
//if(c_raycast_world(x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, 1)){

if(c_raycast_object(colOBJ, x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, 1)){
   //collision check--- never gets triggered
}

Creating the collision object
Code:
shape=c_shape_create();
c_shape_begin_trimesh();
c_shape_load_trimesh("terrain\terrain.mod");
colOBJ= c_object_create(shape, -1, 1);
c_shape_end_trimesh(shape);
//c_world_add_object(colOBJ);
c_shape_destroy(shape)
 
Last edited:

lolslayer

Member
I'm not sure if it's a problem, but did you intend to put in the first collision call at the last input variable of the script a different variable then the one of the second collision call?

"//if(c_raycast_world(x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, -->1<--)){

if(c_raycast_object(colOBJ, x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, -->2<--)){"
 
I'm not sure if it's a problem, but did you intend to put in the first collision call at the last input variable of the script a different variable then the one of the second collision call?

"//if(c_raycast_world(x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, -->1<--)){

if(c_raycast_object(colOBJ, x, y, z, x+xmot, y+ymot, z-5-zspeed*dt, -->2<--)){"
Oh sorry. That was just me trying out the masks argument. Even if the c_object_create mask and c_raycast mask are the same, it still does not work
 
Does anyone know if he released any source code for the dll or updated it? I've been trying to get it to work with newer versions of GM:S and GM 2 but it just causes the game to freeze then be unresponsive.
 
Hey, I know this topic is a little old, but I thought I might be able to help you.

I worked with Venomous / TickleForce in this project: https://github.com/TheStolenBattenberg/MAEngine

He was in charge of writing a more advanced version of the DLL you've mentioned here, and integrating it with the engine. Most of the rendering stuff was still under development, but his 3D Pathfinding and 3D Collision/Physics stuff was fully complete, and you can use it with or without the d3d extension stuff.

I've uploaded it here for you: http://www.mediafire.com/file/uyvcw400jbbjilw/MAE.zip

The scripts for the physics / collision are all prefixed with 'MAE_Phys *', and you can find a pretty good example of its usage in obj_Physics.

Thanks,
- TSB.
 
Top