Tooltips and selecting actors

A bunch of semi-related queries:

Is it possible in Panda to:

a) Have “tooltip” functionality - i.e. have a label pop up when my mouse moves over an actor (to show his name/some stats)

b) Have my mouse cursor change when my mouse moves overs an actor or other model I can click to interact with (as set by myself with a “clickable” tag)

c) Somehow highlight or otherwise indicate an actor that I am using. i.e. Make the model somehow brighter ? (If not, I guess I’d have to add some other model to it to show it’s the active actor).

a) In Astelix’s collision tutorials, you’ll find an exemple about how to click and select 3d objects.

b) Voila

c) According to your game, you can possibly use a glow filter or cartoon shader (see sample exemples)… it’s only an idea!


a) I have clicking 3d objects already working - my question is if it is possible to have a tooltip (small label) pop up when my mouse is moved over an object (no clicking).

b)This is helpful - thx. However, question is how to detect that my cursor is over a specific object (clickable) and then change its shape. (same as (a) above)

c) That may be good. I’ll see if I can get it to work.


It’s the same: Instead of generating events when you click --> generate them when the mouse change position.

Ah, gotcha. whats the best (fastest, least resource intensive) way to detect the mouse moving?

Do it within a constantly running task in your gui class.

This is more or less what I use. (I use a CollisionHandlerQueue. If you use a CollisionHandlerEvent, then the code will look different.) = 0 = 0
self.over = None

def guiTask():
    mwn = base.mouseWatcherNode
    if mwn.hasMouse():
        mx,my = mwn.getMouse()
        if mx,my ==,
            if self.over:
        mx,my =,
        over = self.getCollisions(,
        if over != self.over:
            if self.over:
            if over:
        if over:

To clarify, getCollisions(x,y) is a function in my gui class that sets a picker ray to from the camera node to x,y.