diff --git a/src/Joystick.tsx b/src/Joystick.tsx index 818e721..afedaf5 100644 --- a/src/Joystick.tsx +++ b/src/Joystick.tsx @@ -294,9 +294,9 @@ class Joystick extends React.Component { this.props.stop({ type: "stop", // @ts-ignore - x: this.props.sticky ? this.state.coordinates.relativeX : null, + x: this.props.sticky ? ((this.state.coordinates.relativeX * 2) / this._baseSize) : null, // @ts-ignore - y: this.props.sticky ? this.state.coordinates.relativeY : null, + y: this.props.sticky ? ((this.state.coordinates.relativeY * 2) / this._baseSize): null, // @ts-ignore direction: this.props.sticky ? this.state.coordinates.direction : null, // @ts-ignore