TridentMC / DavincisVessels

A minecraft mod that lets you fly a house. Maintained by darkevilmac.
Apache License 2.0
87 stars 32 forks source link

An idea on how to pull off collision #205

Closed Hypatech closed 6 years ago

Hypatech commented 6 years ago

(I know barely anything about modding so if this is dumb I'm sorry) So I read the FAQ on the forum page, and it mentioned that it was extremely unlikely that collision was going to be implemented due to the fact that you would have to rewrite the system.

I'm sure you're aware that shulkers were implemented in 1.9, and had solid collision boxes. Would it be possible to therefore take that code and apply it to a custom collision box? The shulker collision probably isn't hard-wired to being a box, although I have no idea ¯_(ツ)_/¯

unascribed commented 6 years ago

Hard collision isn't the issue. The issue is that Minecraft uses axis-aligned bounding boxes, meaning 1. they have to be square*, and 2. they cannot rotate.

Any sort of real collision for ships would have to be done entirely custom and patched into the Minecraft game engine, which is obviously undesirable.

: okay, technically, an AABB in Minecraft doesn't have to be square, and you can generate them on-the-fly to simulate rotation by calculating the smallest rectangular solid that would envelope a complex shape, but it still doesn't fix ship collision, since it has to be a continuous rectangular solid. However, all entities that use standard collision boxes are* square - hold F3 and press B to visualize them.

Hypatech commented 6 years ago

Okay, thanks for clearing that up

Hypatech commented 6 years ago

By the way, an unrelated question - I've seen old videos of full block interaction on an airship. Will this be implemented or has the idea been given up on?

unascribed commented 6 years ago

Those were videos of highly experimental and buggy code that pretty much only worked with vanilla blocks; it was far from finished and darkevilmac abandoned it since there was still a lot of grueling work to be done to make it stable.

Hypatech commented 6 years ago

Ah, I see. Thought it'd be some experimental crap haha Anyway, I have ONE LAST question (i swear) is about physics and collision again. Mods like the RC mod use a java port of the bullet physics engine called jBullet. Would this at all help?

unascribed commented 6 years ago

Not really, voxel collision is something general-purpose rigid body engines like Bullet are really bad at.

Hypatech commented 6 years ago

Okay, thanks for answering my annoying stream of questions anyway :)