collision with a sphere

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
warden
Posts: 11
Joined: Thu Nov 24, 2005 3:54 pm

collision with a sphere

Post by warden »

hi there

i'm working on 3d user interface that features circular buttons.

as i'm not into 3d modeling, i'm planning to use simple rectangles with a circular texture and have the outer parts transparent

the problem is to check if the mouse hovers across such a widget:

a ray cast from mouse position into the scene should be the solution, but it would cause a collision even if the transparent part of the texture is being hit

is there a way to have a boundingsphere around a scenenode or something like it? or any other simple way to solve this problem...?

thanks for any help
warden
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

If you can get the collision point, why don't you check the point's distance from the center of the button and do a radius test?
Guest

Post by Guest »

yeah youre right, I just woke up and had the same solution. keep it simple, stupid! :-D thanks!!
Post Reply