Mouse over don't work on text object?


(mxs) #1

You also do not have the mouse over sensor on text objects?


(Monster) #2

Place an invisible plane where the text should appear. Add the logic to this plane.


(mxs) #3

It’s a lot of extra work if you want to do an advanced HUD


(mxs) #4

And when I want to change the text or enter a translation, I will have to change the shape of each plane


(Lyeb) #5

Perhaps, align the origin of the plane to the leftmost edge and scale up on x as text length varies.


(Daedalus_MDW) #6

advanced hud is a lot of work. period.


(Monster) #7

It is always cheaper (performance wise) to have a single plane rather than one for each letter.

I think it is better to define a “text” space where the text should be displayed. To do so you can cover this area with the “clickable” plane. It even provides you the option to define a margin around the text, act as button, show that the mouse is over a clickable area, play animations after clicking … .

It is not really extra work. It can help you to keep your scene organized (typically you start without any text, which makes hte textobject invisible in the 3D view). But this depends on the situation.


(Nicholas_A) #8

The text objects themselves are no-collision. Even if you were to convert the text objects to a mesh which nobody does, if you tried to mouse over it, There is still negative space inside the text which would make the player very angry to try and center the mouse perfectly on one of the characters. Always use planes behind text as collision objects.


(mxs) #9

Ok i understand.
Does anyone know if bgui works correctly with BGE 2.79 or UPBGE??