Hi, all!
I need to implement areas where players/npcs can enter and some event happens/variable set.
on area exit some other event happens.
For example, when player character stays in area near door, the message is displayed "Press E to open"
and when he presses E that door opens. If he is not in this area, there’s no message and reaction to E is
different.
Also can be used as quest spots, better car enter/exit sequences, almost everything.
How would you implement this knowing there will be thousands in the area?
I know it should be possible to do this using “trigger” RigidBodies, but something tells me it will kill
frame rate to unmanageable levels.
Also as compromize these spots can be spawned around player, but how to trigger spawn?
I can record each spot coordinates in K-D tree and spawn ones within 10 unit radius and remove distant ones,
but how to implement the situation when distant NPC should trigger such spot? Looks like entire map of these should
be provided somehow…