Never dealt with this but here's an idea --
Transform the viewing frustrum to the NPCs eyes - and do some sort of testing with that?
How do we know if an object is visible or not ?
Quote:Original post by jykQuote:Original post by jolyqrIn that case, don't worry about broad-phase culling, spatial partitioning, or anything like that. Just write functions to test for the intersection of a ray with the object types you're interested in (e.g. boxes and pyramids), and when you need to raytrace, just trace against every object in the scene.
six objects, maybe, no more. it's not going to be a huge game. it's more like a demo.
There are different algorithms for raytracing various objects, but speed won't be an issue here, so I'd just find something that works and go with it. Things to google for would be 'raytrace box', 'ray box intersection', 'ray AABB intersection', 'ray OBB intersection', 'ray triangle intersection', and similar phrases.
thanks a lot !!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement