Hi,
I noticed how “RaycastAll” takes a minimum of 2 arguments (the position and the direction). I also noticed how the direction doesn’t accept a Quaternion direction so I assumed that it took a eulerAngle instead, but when I tried that even, that didn’t work either.
What I was trying to do was use the “LookAt” statement to have object 1 look at object 2. Then, I wanted to use the RaycastAll statement to see if there was anything blocking object 1 from the path of object 2 after it attempts to look at object 2. One of the objects that should be in the ‘hit list’ then should be object 2 because I set the position of the ray cast to the positioning of object 1 and the direction of the ray cast to the directioning of object 1 (which was then facing object 2) AFTER I used the LookAt statement to have object 1 point to object 2 before I executed the ray cast. I didn’t set the distance of the ray cast so it should be infinite and should return a list of all the objects that the ray cast hits INCLUDING the one the object is looking at.
Then, I noticed that the format for ‘direction’ doesn’t take in angles 0-360 but instead takes values from 0-1, where eulerAngles returns angles 0-360 instead of decimal format. I’m afraid that if I divide everything by 360, it still won’t be accurate. What is the best solution for this? Also, is there an easy way to graphically see what certain raycasts are doing and where they are pointing?
Thank you,
Michael S. Lowe