Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Cars Break Low-Profile Blocks

Nianor opened this issue ยท 6 comments

commented

Cars seem to break "thin" blocks like snow and carpet as easily as they would break full height blocks, when they should probably pass over them instead. While this is most notable on carpets and snow, my guess would be that the issue probably results in unrealistic behavior with collisions on half-slabs, stairs, and most other blocks that are "shorter" than a full block. Given that, this may also have been the cause of some of the problematic behavior that cars have had on slopes.

commented

I can confirm that half-slabs work as intended, as I've used them extensively in road retrofits where full-blocks are too much of an incline for a good amount of the vehicles in the packs. I think the issue is the low hardness of those blocks. MTS will break soft blocks, and IIRC, snow and carpet are just as soft as leaves. I suspect that similar behavior will occur if you run cars through those rather than snow.

Thoughts on how to handle this?

commented

Yes, in the config file, or somewhere, you can have a list of what blocks MTS will break. For example, minecraft:leaves, minecraft:snow, or added blocks such as car:line_side_long from the Ultimate Car Mod.

Try this in the config*:

( # A list of blocks the vehicle can destroy
S:road_blocks <
car:tar
car:tar_slab
car:tar_slope_flat_upper
car:tar_slope_flat_lower
car:tar_slope
minecraft:leaves
minecraft:snow_layer
minecraft:snow
other_blocks:can_go_here_and_below!
>
)
*Actually, modify this to fit the formatting for .cfg files since I know nothing on how to make them...

I had to have the parenthesis to keep GitHub from messing this text up...

commented

That... strikes me as a bad idea, to be honest. Anything will break if you hit it hard enough, and something like a tank will certainly be able to drive through a wall that a car would not. Doing something in absolutes seems like a bad idea. Don, do you already check the height of a block hitbox when colliding with it? 'Cause the wheels alone shouldn't be able to break lower profile blocks by driving into them, they should go over them, right? Is this caused by the car's body hitboxes colliding with blocks that are technically too low for them to hit? I'm trying to get a better understanding of what causes this.

commented

Okay, latest update on this bug. MTS cars also break railways, both IR and vanilla.

commented

Something is indeed wrong here. I can confirm that MTS does check the hitbox height for blocks before destroying them. However, it only does so with collisions with the core collision boxes, and not the wheels or any other parts. For all intents and purposes, MTS should be climbing on the rails, not destroying them. Will investigate this for sure....

commented

Fixed in Commit 3cbc2c9.