Description
The UpdateLookAt
method is part of the PlayerController
class in the Sandbox framework. This method is called during the Update
cycle when the "Using" feature is enabled. It is responsible for updating the player's look direction based on the current input or game state.
Usage
To use the UpdateLookAt
method, ensure that the "Using" feature is enabled in your player controller setup. This method will automatically be invoked during the game's update cycle, adjusting the player's look direction as necessary.
Example
// Example of enabling the Using feature and relying on UpdateLookAt
public class MyPlayerController : PlayerController
{
public MyPlayerController()
{
// Enable the Using feature
this.EnablePressing = true;
}
public override void Update()
{
base.Update();
// UpdateLookAt will be called automatically if Using is enabled
}
}