I’m currently working my way through an old project as a learning experience, and I’ve run into a problem. It’s for a top down strategy game.
Everything in it has been built to rely on 3D collisions - mostly just cubes and capsules that contain a series of sprites in world space (not on a canvas). However, there are some complex areas (essentially buildings) that have odd shapes too them where these basic colliders don’t do the job.
It appears the 2D collider that I was hoing to use to detect when these buildings are selected locks the co-ordinates to in world X and Y, while as the game is top down the sprites are being shown on the X and Z axis, with the camera looking down at them.
The options I can see are:
- Flip the entire game 90 degrees to align with the 2D colliders
- Build some custom shapes in Blender and hope to align them with the sprite
Both of these feel like very time consuming options, and I’m really hoping there’s a feature I’m not aware of that’s essentially an input mask for an OnMouseOver / OnPointerOver events based on the transparency of a sprite.