[Pollution of the Realms compat] Plane gets stuck in its own pollution
zack-emmert opened this issue ยท 14 comments
What should happen: Aircraft and other vehicles should simply pass straight through Pollution of the Realms gas blocks
What does happen:
I've only noticed this issue a couple of times when testing, but if an airplane creates pollution via pollution gas blocks, it's possible for the gas block to intersect with the model of the airplane, at which point the plane will become stuck in its own pollution and be unable to move.
This issue hasn't occurred often, but I've been able to replicate it with two different aircraft from the official vehicle pack
What's a pollution block? And why are my aircraft creating them? And can regular players pass through them?
Pollution blocks are the basic idea of POTR. Basically, carbon, sulfur, dust, etc.
When pollution is made, it comes out in the form of a block that floats up into the air, like gravel... but it goes up to a certain Y level.
I think the problem is that iirc you can pass through these, but slightly slower.
If I remember correctly, some pollution mods work by detecting when an object has "fuel" in it (usually stuff like gasoline or diesel) and measuring the rate that the fuel is being deleted, to make them more universally compatible. Hence the pollution creation. As to the actual blocks... it's odd. Technically they behave something like cobwebs but not as strong, slowing you down a bit when you try to move. They do that because they weren't designed with lift physics in mind, and because of the way MTS does collisions, "pollution" invisible blocks aren't the same as air. It still detects them as blocks and registers collision.
Hrm. I may be able to patch this, then. If the blocks don't allow themselves to be hit, I may be looking at the wrong collision boxes for them.
Well, if it's a block like a cobweb, then that will slow things down as the cobweb block actively adjusts the velocity of entities that are inside them. Honestly, I'm kinda thinking this is desired behavior. If players slow down in pollution, shouldn't vehicles too?
The issue that I'm running into isn't the the vehicle is slowed down, it's that it's completely frozen and stuck in place
Oooh, now that's different....
These pollution blocks. Can you break them? Or can you only collide with them? Cause I suspect what's happening is that MTS is doing collision checks, and sees the invisible pollution "block" and thinks it's hit something like leaves or stone.
Interesting. Can you hit them with tools, or are they like air, so when you try to hit them you just swing as if you're hitting nothing?
I haven't tried (I'm firing up the game now and I'll get back to you when I give it a shot), but according to the Pollution of the Realms docs, they can only be removed by a vacuum sort of thing, which IIRC doesn't operate like a tool