ImmersiveMC

ImmersiveMC

2M Downloads

Use OBB for Shield

hammy275 opened this issue ยท 3 comments

commented

With OBBs implemented, I think it makes sense to use it for the shield. This should massively reduce the weirdness with shield detection. This will also finally be a good place to ensure roll works properly with OBBs, since no other Immersive using OBBs uses roll at the moment.

Note that we should also be doing a vector check on collision, since we shouldn't block a projectile if the shield isn't facing it.

commented

Needs to be ported to other branches. Both 247f46f and d93c97b need to be ported down.

commented

For handling the shield hitbox rotation correctly, we need to do the following in order:

  1. Rotate by yaw on YN
  2. Rotate by pitch on XN.
  3. Rotate by roll on ZP
  4. Rotate by PI/2 (90 degrees) on YN to adjust for shield being on the side of the arm.

Shield positioning code will also need some work, but this is major progress!

Will need to redo OBBs to be a set of rotations, rather than just a pitch, yaw, roll.

commented

Multiple things to do actually: