Closed chrisspen closed 4 years ago
Hi!
ray_direction=(0,0,0)
This is not a valid direction vector. Try,
ray_direction=(0,0,-1) # ray going straight down
This is valid vector,
ray_direction=(0,0,1000)
but not a valid direction vector because the length is not equal to 1. Try,
ray_direction=(0,0,1) # ray going straight up
This will not intersect with the object, just the scene boundary.
Same for,
ray_direction=(0,1,1)
You need to normalise all direction vectors before passing them to pvtrace.
Ah, I though ray_direction was the point being looked at, not a direction vector. That makes sense. Thanks for clarifying. Works well.
I'm trying to test the Scene.intersections functionality with:
and it's throwing the error:
If I change the ray_direction so that's it's looking at (0,0,-1) instead of the origin, then it works. However, I would think it should be able to look at the origin.
Another odd error is that if I use the ray_direction of (1,1,0), which should intersect with the floor, it doesn't register a hit with the floor node.