I'm struggling to understand the equation on page 55 of the following paper.
the previous page 54 explains the premise behind the equation.
Here is my code in Unity3d to try and reproduce it:
zForward = new Vector4(gameObject.transform.forward.x,gameObject.transform.forward.y,gameObject.transform.forward.z,0); plane = new Vector4(gameObject.transform.up.x, gameObject.transform.up.y, gameObject.transform.up.z, 0); Vector4 playerPos = new Vector4(player.transform.position.x,player.transform.position.y,player.transform.position.z,1); Debug.Log(Vector4.Dot(plane,playerPos)/Vector4.Dot(plane,zForward));
gameObject has a collider that is triggered when the player walks in it. I then try to calculate the field from that paper...
The author suggests that the math in the equation is wrong, but i'm not sure what he is trying to do WITH that exact math there. seems to me like it is missing some sort of position or something of the plane??? just a guess.