Working with a 2D sprite in a 3D Game

Hey Guys,

I am working on creating a 3D game with unity using 2D sprites as some of my players. I have them automatically “billboarding” towards the camera. Once in the scene, do they behave pretty much like a regular 3D object would? Can I use Vector3’s or normal 3D rigidbodys on them?

does anyone have an example game that does this that I could look at?

Hopefully I am on the right track.

Thanks guys…

Yep. You can even mix 2D and 3D objects however you like. To Unity, it’s pretty much all the same.

Have fun,

  • Joe

would you need to discern between 2d & 3d colliders when doing collisions & triggers? Eg the 2d object had the trigger & gets hit by the 3d then it uses OnTrigger2d but if it was the other way it would use the usual OnTrigger?

2D and 3D colliders are about the type of game, not the type of object. As in, use 2D colliders for a 2D game (eg. flat side or top view), but use 3D colliders for a 3D game (and that includes OnTrigger vs. OnTrigger2D). That is true for both meshes and sprites; you can have 2D sprites in a 3D game, and you can have 3D objects (just seen from one side obviously) in a 2D game.