[ad_1]
Recreation Improvement Stack Change is a query and reply web site for skilled and impartial sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The very best solutions are voted up and rise to the highest
Requested
Considered
3 instances
Downside
In a platformer stage I would like the enemy (purple) to detect the participant (inexperienced) inside a given vary. I’ve this presently working utilizing an overlap circle examine (dotted purple circle). Nevertheless this circle can prolong onto larger platforms however I solely need the participant to be detected whether it is on the identical stage.
Tried Options
- Checking the Y stage distinction between the participant and enemy.
- Raycast from the enemy to the participant to examine if there’s a platform between them. This half works as a result of there are instances when the participant is excessive above the enemy however there isn’t a platform between them (e.g. leaping between platforms)
What is a sturdy resolution that I can make use of right here?
$endgroup$
It’s essential to log in to reply this query.
lang-cs
[ad_2]