3D/perspective Top down shooter bullet issues

Posted by Tseng on Game Development See other posts from Game Development or by Tseng
Published on 2012-04-29T20:32:59Z Indexed on 2012/07/05 21:25 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

I'm developing a top-down shooter with multiple levels (ground for ground units, middle level for buildings, top level for air unity).

The problem is the collision. Though I can make the collider box of a bullet be long enough to reach the ground (and collide with it), the real issue is optical.

When the bullet is fired from a aircraft and collides with some object on the ground (building, ground unit) it will be optically offset due to the perspective camera, because it looks like the shot "by-passed" the target as seen below

top down shooter graphical issue

Is there any way to make the bullets collide perspectively correct? I'm using Unity3d Engine and it offers only simple colliders (box, sphere, cylinder, mesh and wheel), though I don't think a cone-formed collider would solve this issue.

I'd need a (cheap) way to check if it's overlapping a destructible object? I thought of casting a ray from the camera through the bullet and if it hits something destructible, trigger an action, but that's quite punctual and maybe to performance heavy on certain number of bullets

© Game Development or respective owner

Related posts about c#

Related posts about 3d