lundi 30 juin 2008

Dynamic mouse cursor!

Now I successfully implemented dynamic mouse cursor: when I move it over an object, it changes:
- appear/disappear
- denotes the name of the object over which the mouse is

Proof:

3 commentaires:

Anonyme a dit…

and how do you implement the dynamic cursor? With collisions on the "mouse ray"?

Loïc Lefèvre a dit…

Exactly, using the BoundingBox volumes for fast collision detections and a modified implementation of jmetest.intersection.MousePick.

To handle appear/disappear, I use the cullHint property of my Node by setting it to:
- Spatial.CullHint.Always to make it disappear
- Spatial.CullHint.Inherit to make it reappear

Anonyme a dit…

ok, than you do it the same way like me , and I thought there woud be a more elegant way :)