Apply wall height's bounds to the rays before doing colission checks (fixes #190)
This commit is contained in:
1 parent
3afb1f30b7
commit
a3d942c287
1 file changed
+3
@@ -28,6 +28,9 @@ export async function moveEntities(draggedEntity, selectedEntities) {
|
|||||||
const hasCollision = selectedEntities.some(token => {
|
const hasCollision = selectedEntities.some(token => {
|
||||||
const offset = calculateEntityOffset(token, draggedEntity);
|
const offset = calculateEntityOffset(token, draggedEntity);
|
||||||
const offsetRays = rays.filter(ray => !ray.isPrevious).map(ray => applyOffsetToRay(ray, offset))
|
const offsetRays = rays.filter(ray => !ray.isPrevious).map(ray => applyOffsetToRay(ray, offset))
|
||||||
|
if (window.WallHeight) {
|
||||||
|
window.WallHeight.addBoundsToRays(offsetRays, draggedEntity);
|
||||||
|
}
|
||||||
return offsetRays.some(r => canvas.walls.checkCollision(r));
|
return offsetRays.some(r => canvas.walls.checkCollision(r));
|
||||||
})
|
})
|
||||||
if (hasCollision) {
|
if (hasCollision) {
|
||||||
|
|||||||
Reference in new issue
Block a user