VazkiiMods / Psi

Spellcrafting mod for Minecraft based around Vector math and stack-based processing
http://psi.vazkii.net
314 stars 89 forks source link

Axial look on Targeted projectile returns incorrect x&y vector results #788

Closed cambates99 closed 10 months ago

cambates99 commented 1 year ago

Version Information

Forge version: 40.2.1 Psi version: 2.0.0

Further Information

Steps to reproduce:

  1. You can visualize the discrepancy using this spell: https://imgur.com/fQuhc4A
  2. Fire an arrow into a wall and look at it's axial look vector (this works for non-arrow projectiles)
  3. It's axial look vector is correct only in the z-axis direction

What I expected to happen: I expect the axial look of the projectile to have the correct x and y vectors.

What happened instead: Projectiles will have a correct z vector, but reversed x and y vector

TheFurryDevil commented 1 year ago

I don't think this is on Psi. If you look at arrows with F3 + B you'll see that their look vector is not what you expect. Not sure what they are looking it, it's only semi related to their flight direction. As a workaround you can get the entity motion vector and normalize it, this works even for arrows stuck in walls, even though technically they are not moving anymore.

Kamefrede commented 10 months ago

As TheFurryDevil said, this is a vanilla thing, and the behaviour is not constant between all projectiles, and as to not special case any kind of projectile we'll be keeping it the same.

cambates99 commented 10 months ago

Makes sense, I should have validated the projectile's axial look vector in vanilla first. Thank you!