setPlayerAim
setPlayerAim(
writer,point):void
Aims the local player’s character at point from a view, through the
player’s input, so the step faces the character to it alone and in a
room, the player’s page predicting the turn and the room deciding it:
the point under the pointer that usePointerPlanePoint reads, or a
page’s own auto-aim. Each frame, before each step, the page measures the
flat direction from the character to the point into
characters.inputs.aim. null lets the aim go, and the character keeps
facing where it faced.
The request holds until a view lets it go, the view that asked
unmounts, the window loses focus or the page hides, or the player’s
character changes, as at its destruction or a control transfer; the last view
to ask holds it. The player’s own keys or aim
stick win over it while held, and a game’s point, aimAt from a step,
wins over both. A modal, a devtools camera and a live exclusive input
context rest it, as they rest the aim stick. It is flat: the character’s
arm points level along it. As Unreal’s player controller sets its
control rotation on the client and sends it with every move.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
ViewWriter |
point |
AimPoint | null |
Returns
Section titled “Returns”void