In the last post, we updated the player’s attack projectile from a capsule to a sprite. Today we’re going to change the enemy from a cube to a sprite!
The challenge is to update the enemy from a 3D cube to a 2D sprite in the
Let’s get started.
Switch to 2D
We’re going to follow the same steps as before to switch to 2D. I’ll replace the 3D components with a trigger
CapsuleCollider2D, and a
Rigidbody2D. Here are the components we have for the enemy prefab after making these changes.
I’ll also update the enemy script to use
Here’s the result.
Short and simple, we’re done for now.
Stay tuned for the next post. Take care.