The Javascript es6 version of the original furnishup/blueprint3d. Need some royalty free low poly models for the inventory. Can someone help me with this?
Describe the bug
The collision detection routine does not seem to be working properly.
To Reproduce
Steps to reproduce the behavior:
Change the return statement to false inside the if statement in 'isValidPoisiton' in 'FloorItem' class.
Just move an floor item through a wall or outside the model.
Expected behavior
When an item is moved through a wall or to outside of the walls (property), the movement should be disabled. However, the current implementation work strange, mostly just the opposite of what it should be doing.
Additional context
There was a bug in 'pointInPolygon' function. The if statement which makes a call to 'lineLineIntersect' method was not passing with proper parameters properly. I have change the call into:
if (Utils.lineLineIntersect(start, point, {x: tFirstCorner.x, y: tFirstCorner.y}, {x: tSecondCorner.x, y: tSecondCorner.y})) {
tIntersects++;
}
The change is on 'firstCorner' and 'secondCorner'. Now they are being passed like tuples.
Anyways, even after fixing this bug, the is something wrong with the computation I guess.
Describe the bug The collision detection routine does not seem to be working properly.
To Reproduce Steps to reproduce the behavior:
Expected behavior When an item is moved through a wall or to outside of the walls (property), the movement should be disabled. However, the current implementation work strange, mostly just the opposite of what it should be doing.
Additional context There was a bug in 'pointInPolygon' function. The if statement which makes a call to 'lineLineIntersect' method was not passing with proper parameters properly. I have change the call into:
The change is on 'firstCorner' and 'secondCorner'. Now they are being passed like tuples.
Anyways, even after fixing this bug, the is something wrong with the computation I guess.