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

Legacy GM 2D Object colliding with 3D Model?

B

BerneyTD

Guest
Hi, I'm trying to get a 3D model which i've created (a pr_linelist tetraheadron) to interact with a player object within 2D space, as if the 3D model were actually just a 2D object.

The tetraheadron currently rotates along its y axis, though, in the future it should rotates in all directions, so i cannot just use a 2D animation on an object, I am also planning on using other 3D models in the future once the tetraheadron works.

I came up with 2 different methods for possibly doing this:
1. Use draw_getpixel to check if there is a white pixel in the screen near the player and base collision off of that.
2. Convert the drawn image into a sprite (somehow) and set an obj_tetraheadron's sprite to that - then just use place_meeting(x,y,obj_tetraheadron) for basic 2d collision.

The problems are that method 1 seems extremely inefficient, and im not sure if method 2 is even actually possible.

Is there any way that either of these methods can be pulled of, or is there another method that i am missing?

Thanks,
Berney :)
 
F

Fishman1175

Guest
Haha this takes me back, about 8 years ago I asked almost this exact question on the old forums. The answer was to go to full 3D collisions. At the time, that meant using P3DC.dll :http://gmc.yoyogames.com/index.php?showtopic=449508&hl=p3dc&page=1

There may be more relevant options now for 3D collisions but that’s a good DLL for game maker use. You would add both the tetrahedron and the plane as 3D models in P3DC and then check if they collide.
 
B

BerneyTD

Guest
Haha this takes me back, about 8 years ago I asked almost this exact question on the old forums. The answer was to go to full 3D collisions. At the time, that meant using P3DC.dll :http://gmc.yoyogames.com/index.php?showtopic=449508&hl=p3dc&page=1

There may be more relevant options now for 3D collisions but that’s a good DLL for game maker use. You would add both the tetrahedron and the plane as 3D models in P3DC and then check if they collide.
Thanks so much, i was thinking about using p3dc but it seemed kinda more complex.

Will dl it now and see how it goes

Cheers :)
 
Top