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 is automatically invoked during the Update
cycle, so you do not need to call it manually. It is typically used to adjust the player's look direction in response to input or other game events.
Example
// Example of enabling the Using feature and utilizing 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
}
}