Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / colision between 2d and 3d

Author
Message
haliop
User Banned
Posted: 7th Sep 2008 00:15
hello all.

i have an intersting question.
i have decided to make my game engine , to be 2d and 3d.
as the 2d are the characters vechiles and such that you play
and the world , is the 3d object meshes or what ever .
is it possible to make a collision between a 2d sprite and a 3d wall for example?
i'm still learning the ropes here .

ty for your time.
Manfred
16
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: Austria
Posted: 18th Sep 2008 23:40
You could try to use your sprites as textures for meshes and make 3D collision detections. Your textured meshes could be as high and as wide as your sprites, the depth minimal. It should also be able to make the not-textured faces of the meshes transparent.
You could move the meshes instead of the sprites.

Another way to do it is using bounding boxes for 3D models. The disadvantages of this method are that you probably have to build the bounding boxes yourself for each 3D model and compare the coordinates of all objects that may collide. In this case the depth of a sprite is 0 so it is defined by f(Sprite)->Sprite(x_min, y_min, x_max, y_max, z_abs), as long as it is parellel to the z axis. This is also legal, if the sprite is parallel to the x or y axis, in these cases x respectively y would be just one value (x_abs or y_abs).

Casting, the art of manipulation; further information every day in TV.

Login to post a reply

Server time is: 2024-09-30 05:29:22
Your offset time is: 2024-09-30 05:29:22