Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- run:
- Correct entity width: 0.6
- *** First we move an entity around the way vanilla code does and see the problem...
- Starting out at some place in the world:
- Xmin=1.8,Xmax=2.4,w=0.5999999999999999
- Xcenter=2.1
- Have the entity get shoved around for a while...
- Shifting Xmin and Xmax both by:
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.01562500000000011
- +0.015625000000000114
- +0.015625000000000003
- -0.015625000000000222
- +0.015625000000000003
- +0.015625000000000222
- Finally ended up at:
- Xmin=2.0187500000000034,Xmax=2.6187499999999995,w=0.5999999999999961
- Xcenter=2.3187500000000014
- new width is 0.5999999999999961, 3.885780586188048E-15 smaller than it should be
- Imagine it got shoved one last time, against a wall to the west:
- New bounding box and computed center:
- Xmin=2.0,Xmax=2.599999999999996,w=0.5999999999999961
- Xcenter=2.299999999999998
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.299999999999998
- Xmin=1.999999999999998,Xmax=2.599999999999998,w=0.5999999999999999
- The west face now intersects the wall by -1.9984014443252818E-15
- Imagine instead it got shoved one last time, against a wall to the east:
- New bounding box and computed center:
- Xmin=2.400000000000004,Xmax=3.0,w=0.5999999999999961
- Xcenter=2.700000000000002
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.700000000000002
- Xmin=2.400000000000002,Xmax=3.0000000000000018,w=0.5999999999999996
- The east face now intersects the wall by 1.7763568394002505E-15
- *** Now try again with code that maintains consistency between bounds and center...
- Starting out at some place in the world:
- Xmin=1.8,Xmax=2.4,w=0.5999999999999999
- Xcenter=2.1
- Have the entity get shoved around for a while...
- Shifting Xmin and Xmax both by:
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.01562500000000011
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- +0.015625000000000003
- -0.015625000000000222
- +0.015625
- -0.015625000000000226
- Finally ended up at:
- Xmin=1.9874999999999805,Xmax=2.5874999999999804,w=0.5999999999999999
- Xcenter=2.2874999999999805
- new width is 0.5999999999999999, 1.1102230246251565E-16 smaller than it should be
- Imagine it got shoved one last time, against a wall to the west:
- New bounding box and computed center:
- Xmin=1.0,Xmax=1.6,w=0.6000000000000001
- Xcenter=1.3
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=1.3
- Xmin=1.0,Xmax=1.6,w=0.6000000000000001
- The west face now intersects the wall by 0.0
- Imagine instead it got shoved one last time, against a wall to the east:
- New bounding box and computed center:
- Xmin=2.4000000000000004,Xmax=3.0,w=0.5999999999999996
- Xcenter=2.7
- Only the center is saved to disk. When reloaded, we get this:
- Reloaded center and computed faces:
- Xcenter=2.7
- Xmin=2.4000000000000004,Xmax=3.0,w=0.5999999999999996
- The east face now intersects the wall by 0.0
- BUILD SUCCESSFUL (total time: 0 seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement