Advertisement

Making rotation stop on mouseover

Started by August 27, 2002 06:28 PM
1 comment, last by Maega 22 years, 6 months ago
Hey guys, I have a spinning cube, and I want to be able to make it stop rotating when I mouse over it.. How hard is it to do? Im going to use this as a menu for my app
You can always cheat...if the cube is always in one place you can just check if the mouse is within the area (a rectangle) around the cube and set bRotating to false. Otherwise you might have to mess around with simple object picking.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[twitter]warrenm[/twitter]

Advertisement
I''ve never had much luck with the built-in opengl object selection feature... just drop a ray at the mouse coords (gluUnproject) from the front to the rear clipping plane and test for intersection with the faces or bounding box or whatever.

This topic is closed to new replies.

Advertisement