fix: pointer works with camera offset
This commit is contained in:
parent
ffac435e8d
commit
ffe27b17a7
|
@ -105,7 +105,13 @@ function createMoveToNormal(position) {
|
|||
if (magnitude < 8) {
|
||||
return;
|
||||
}
|
||||
const diff = Vector.sub(position, entityPosition);
|
||||
const diff = Vector.sub(
|
||||
position,
|
||||
Vector.sub(
|
||||
entityPosition,
|
||||
Vector.sub(selfEntity.camera.realPosition, halfVisibleSize)
|
||||
),
|
||||
);
|
||||
return Vector.normalize(diff);
|
||||
}
|
||||
let pointingAt = [-1, -1];
|
||||
|
|
Loading…
Reference in New Issue
Block a user