Immersive Railroading

Immersive Railroading

3M Downloads

RealBB.grow() not behaving as expected

latibro opened this issue ยท 4 comments

commented

Describe the bug
AxisAlignedBB.grow() will expand the bounding box with the given values in all directions, but it looks like RealBB is trying to do this smarter taking the rotation of the stock into the calculation, but I the outcome seems kinda weird. When the BB is expanded with as expected in some directions, expanded double to expected in one direction, and contracting (negative expand) in one direction.

How to reproduce
Steps to reproduce the unwanted behavior:

  1. call entity.getBoundingBox().grow(10) on a stock entity

This result in the BB being expanded like this:
minX + 10
minY + 10
minZ - 10
maxX + 10
maxY + 20
maxZ + 10
(the numbers may be different depending on the rotation of the stock)

Expected behavior
It was expected that grow(10) would grow the bounding box with 10 in all directions

Screenshots
If applicable, add screenshots to help explain your problem.

System Information
OS: N/A

System Memory: N/A

Allocated Memory: N/A

CPU: N/A

GPU: N/A

IR-Version: 1.8.0

Forge-Version: 1.12.2

Modlist
Provide a list of the mods you used. You can either directly write them in here or use an online service like https://pastebin.com/ and provide the link.

latest.log
Provide the latest.log by going into your Modpack_folder/Logs, paste the contents of the file to an online service like https://pastebin.com/ and provide a link.

Additional context
Provide any additional information that might help us fix the bug.

commented

Seems like IR is only using the grow method here

RealBB bb = this.getCollision().grow(new Vec3d(-0.25 * gauge.scale(), 0, -0.25 * gauge.scale()));

Which looks like something that removed snow from the track

commented

IR 1.6.1 is far deprecated. It's unlikely this will be supported unless the issue still persists in IR 1.8.0/

commented

Oh sorry I didn't fill the IR verions - sorry (will update the description now - is is 1.8.0)
I already had a talk about the bug with Cam on Discord, so just wanted to document it as I promised Cam :-)

commented

Thanks! I really need to add a test suite for this