feat:修改小车角度问题
This commit is contained in:
parent
7156ee6ddf
commit
b0cf3a896d
@ -114,7 +114,8 @@ const monitorScene = async () => {
|
|||||||
} else {
|
} else {
|
||||||
const newX = x - 60;
|
const newX = x - 60;
|
||||||
const newY = y - 60;
|
const newY = y - 60;
|
||||||
const rotate = angle;
|
// 后端 angle 为逆时针,把转换改为“先取反再加偏移”:
|
||||||
|
const rotate = angle == null ? undefined : -angle + 180;
|
||||||
return { id, x: newX, y: newY, rotate, visible: true };
|
return { id, x: newX, y: newY, rotate, visible: true };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user