Aim Assist
In the interest of creating the most enjoyable experience for all players, it’s important to consider how to balance any competitive gameplay across players on different devices. In particular, on mobile devices, the user can struggle with fast twitch controls in high stress or competitive environments. To remedy this, you can use an aim assist system that helps the player track potential targets. This is driven by the Aim assist strength value in the Controls menu.
You interact with the Aim Assist Strength system by using two simple API controls. One control suggests a target to the system. The other control clears the target. You can specify the target as either a Player, an Entity, or a Vec3.
You can find the Aim Assist APIs in the horizon/core module. You can also read about them in the reference documentation.
Consider the game Super Rumble as a usage example. A system could be created that gathers a list of all players currently in play. The system could then periodically iterate through the list of players to find the player closest to the aiming direction of an individual with aim assist, and then set this player as the aim assist target. If there are no viable targets (i.e. there are no players close enough to the aiming direction of the individual), then this list is cleared.