Unity Playmaker 2D Platformer - Boss Enemy Eye Follow & Blink
In this Unity Playmaker 2D Platformer - Boss Enemy Eye Follow & Blink tutorial, I'll start setting up the enemy boss. I'll start with setting up the Boss enemy sprites and having the eye follow the player. I'll also set up a random eye blink. (to Join my discord server add a comment and I'll repl
This tutorial kicks off a boss-enemy mini series for the 2D platformer by building the boss's eye: an iris that tracks the player around the screen and an eyelid that blinks on a random timer. Both behaviors come from tiny Playmaker FSMs — one action each for the tracking, and a simple two-state loop for the blink.
Step 1 — Prepare the boss sprite sheet
The boss lives on a single sprite sheet imported in Multiple mode so it can be sliced into parts: the body, a closed-eye sprite for blinking, the eyeball, a small cover piece, the iris, and bones for legs that will strike at the player in a later episode. To keep the pixel-art look crisp, the import settings are 24 pixels per unit, Mesh Type set to Tight, Wrap Mode Clamp, and Filter Mode Point. Create an empty game object called Boss Enemy and assemble the sliced pieces under it.
Step 2 — Layer the eye so the iris sits inside it
For the iris to read as being inside the eye rather than pasted on top, bump the main eye background's order to 2 so it renders in front of the iris and cuts it off at the edges. One more piece of setup matters here: in the Sprite Editor, the iris sprite's pivot is offset toward the top of the sprite rather than centered. That off-center pivot is what lets a simple rotation swing the iris around the eye like a real pupil.
Step 3 — Make the iris follow the player
Add an FSM to the iris — call it Eye Follow — with a single Look At 2D Game Object action. The game object to rotate is the iris itself; drag the player in as the target. On the first test the iris points the wrong way, which is where the Rotation Offset comes in. Drag the offset value during play mode until the iris lines up with the player — an even 100 works for this sprite setup. Since tweaks made in play mode don't persist, copy the value before stopping, then paste it back in once you're out of play mode.
Step 4 — Add a random blink
Select the closed-eye sprite and add a second FSM called Eye Open. The trick is nothing more than toggling the sprite renderer: in the first state, Set Visibility turns the closed-eye sprite off, then a Wait Random action holds between 2 and 4 seconds so the blink never falls into a predictable rhythm. Its finished event, named eye close, transitions to an Eye Closed state that sets visibility on and runs a plain Wait — blinks are fast, so keep it to a fraction of a second. It starts at 0.2, but testing shows 0.1 feels snappier. A finished event named eye open loops back to the first state.
Test and continue
Press play: the iris should track the player as you run back and forth, with quick random blinks layered on top. That's part one of the boss — the legs and attack patterns come next in the series.





