Skip to content

1681-engine / index / aimPoint

Function: aimPoint() ​

ts
function aimPoint(
   from, 
   shape, 
   share, 
   lastAim, 
   centre?
): object;

Defined in: src/input/AimGesture.ts:143

Where an aimed skill goes, as a mouse would have said it: the aim angle and the ground point. A knob with no length keeps lastAim. A direction may snap to snap radians (0 or none for free aim).

Parameters ​

ParameterTypeDefault value
fromPointundefined
shapeAimShapeundefined
sharePointundefined
lastAimnumberundefined
centrenumberAIM_CENTRE

Returns ​

object

aim ​

ts
aim: number;

x ​

ts
x: number;

y ​

ts
y: number;

Released under the MIT License.