NeonSturm
StormMaker
unless we are talking about rotating a sphere with it's center at 0 0 0 of the ship, then it is just squares
Ship, position x y z, rotation ha va, scale w h l --- h=horizontal, v=vertical, a=angle, width, height, length
Projectile, position absolute, rotation absolute, scale absolute
-> translate by -x, -y, -z
Ship position 0 0 0, rotation ha va, scale w h l
Projectile, position relative(to ship), rotation absolute, scale absolute
-> rotate by -ha -va
Ship position 0 0 0, rotation 0 0, scale w h l
Projectile position relative, rotation relative, scale absolute
-> scale by 1/w 1/h 1/l
Ship is a 1 1 1 sphere around 0 0 0
Projectile position is relative to ship and scaled proportional to the new ship size for calculations
Projectile rotation is relative to the ship (required for scale process)
Projectile scale doesn't matter for impact point check and collision check against the sphere.
Projectile, position absolute, rotation absolute, scale absolute
-> translate by -x, -y, -z
Ship position 0 0 0, rotation ha va, scale w h l
Projectile, position relative(to ship), rotation absolute, scale absolute
-> rotate by -ha -va
Ship position 0 0 0, rotation 0 0, scale w h l
Projectile position relative, rotation relative, scale absolute
-> scale by 1/w 1/h 1/l
Ship is a 1 1 1 sphere around 0 0 0
Projectile position is relative to ship and scaled proportional to the new ship size for calculations
Projectile rotation is relative to the ship (required for scale process)
Projectile scale doesn't matter for impact point check and collision check against the sphere.