(05-30-2014, 03:08 AM)worktycho Wrote: [ -> ]No, the dot product would be x1*x2 + y1*y2 + z1*z2 and for normalized vectors is equal to the cosine of the angle. What your doing is (x1-x2)2 + (y1-y2)2 + (z1-z2)2 and I don't know what that is.
Oh right, it needed to be multiplied. What STR is doing doesn't make sense
I think the raytracing vs vector math argument is pretty much mute as we need to do the ray tracing to see if the player can actually see the enderman.
(05-30-2014, 03:11 AM)worktycho Wrote: [ -> ]I think the raytracing vs vector math argument is pretty much mute as we need to do the ray tracing to see if the player can actually see the enderman.
Yeah you can use the tracer class for that. Also I never said he needed to do raytracing, only a ray-sphere intersection. The arguments are mute anyway because it will have negligible performance impact.
You would do the intersection check before the tracing though, because the trace is indeed much slower. The trace is only necessary when it is known the player is actually looking in the direction of the enderman.
derp. Yeah ray-sphere intersection is cheap, I got it confused with raytracing.
Did you know Battlefield 3 is now free on Origin?

Until 3rd of June.
Programming question:
Everyone emphasises the importance of checking that the provided "length" of some received data is actually in tandem with the actual data sent. If we can verify this, why bother sending a length at all and just compute it locally if it is needed?
Thanks!
I'm not quite sure what you're referring to, can you give an example?
Oh, right. Yeah, that is one strange protocol design there, sending the length multiple times. Once would have been enough.
TLS is an internet standard. Its doing massively more than it was originally designed for with all changes to the standard backwards compatible with existing implementations as well as previous versions of the standard. Its the protocol equivalent of a fortran bank application.