-
Notifications
You must be signed in to change notification settings - Fork 7
Player Highlight Selection
The PlayerHighlightComponent is a component responsible for rendering a highlight on the current player cursor position. This highlight appears as a box that follows the player's cursor within certain bounds (maximum reach of the player). The component also has the ability to be muted or unmuted based on specific events (while in the Tractor). This is a useful feature as players can visually see the targeted tile when using items or tools.
The PlayerHighlightComponent is used in a game environment to visually highlight the player's cursor position. It utilizes a DynamicTextureRenderComponent to display the highlight, and it can be muted to turn off the highlight effect based on game events.
Updates the position of the player highlight to match the current player cursor position. Translates the mouse position to world coordinates. "Locks" the highlight to the closest tile on the game map. Indicates the tile the player is currently going to act on.