mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fixed #1950 3D cursor offset on rotated cube face
This commit is contained in:
parent
3b859e477d
commit
45eec0bfbd
@ -59,6 +59,10 @@ class CubeFace extends Face {
|
||||
let lerp_x = Math.getLerp(this.uv[0], this.uv[2], point[0]);
|
||||
let lerp_y = Math.getLerp(this.uv[1], this.uv[3], point[1]);
|
||||
|
||||
for (let i = 0; i < this.rotation; i += 90) {
|
||||
[lerp_x, lerp_y] = [1-lerp_y, lerp_x];
|
||||
}
|
||||
|
||||
if (this.direction == 'east') {
|
||||
vector.x = to[0];
|
||||
vector.y = Math.lerp(to[1], from[1], lerp_y);
|
||||
|
Loading…
Reference in New Issue
Block a user