• Advertisement
Sign in to follow this  

Spotlight Collision

This topic is 1663 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Before I add lights to my pixel shader, I first check for collision between the mesh bounding sphere and the light radius, I have done that with point lights.

 

However, I'm not sure how to do the same with spot light, I want to check if the spot light is affecting the mesh.

 

So basically, I want to get 2 values from the spot light (position and radius) so I can check for collision, here are the values that I already have:

spotLight.position

spotLight.direction

spotLight.range

mesh->CollisionTest(???, ???); // Need to specify the light sphere position and radius
Edited by Medo3337

Share this post


Link to post
Share on other sites
Advertisement

You could build a bounding frustum, look it up on the net. If you are using directX there should be a helper class for creating one and checking for collisions with it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement