First of all, great to be back! Cranked out my latest game in RPG Maker again to get it all situated in time for festival submissions and the like, but now I'm back into moving it over to Unity and Adventure Creator.
So, here's my problem - I'm in 2D, working with overhead sprites (JRPG style) that only move in four directions. Rather than a hotspot detector that sits directly below the character at all times, though, I want it to be a bit in front of whatever direction the character is *facing*.
I get the sense that it works this way by default in 3D, but it doesn't seem to be the case in 2D. Let me know if what I'm looking for is not clear - what I'm saying is that I don't want hotspots to trigger unless the character is facing towards it, so I want to use a narrow hotspot detector that sticks out the direction they are facing. So when facing left, offset to the left. When facing right, offset to the right, Up when up, down when down...
For reference, in my last game I just made the hotspot detector a full circle around the player and set the hotspot detection to the nearest only. It worked not too bad, and players would pretty much intuitively face towards the hotspot object anyways, but it'd be perfect for it to work like this instead.
Please let me know if anyone has encountered and overcome this...! Thanks!
Comments
The way AC handles 2D characters is to rotate them in 3D space, but keep their "sprite childs" facing the camera at all times by counter-rotating them. This means that you'll need to have your Hotspot Detector be a child of your sprite in order to have it correctly orientated.
You could try animating the position of your Hotspot Detector as part of your player character's animations. Placing it to their left for the left-facing idle/walk/run animations, for example.