SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
86 stars 18 forks source link

Add vision events #2770

Closed Jtinha2000 closed 3 years ago

Jtinha2000 commented 3 years ago

Add view events, not like NightVision/Headlamp events, but events related to when player has changed view by moving mouse for example or when the visibility changes

This can help with SCP Fundation plugins like a Peanout plugin(if you doesn't knows what is the Scp Fundation, and this example you can see this fast document: https://scp-wiki.wikidot.com/scp-173, but for resume, when you look for the Peanout he completly stops and when you stop looking he starts moving), also can be used with the visibility changes events to for give for peanout the chance to move when the lights goes off

SDGNelson commented 3 years ago

Considering how frequently the player's view changes it would be better to poll the player viewpoints periodically from your plugin.