MouseOver sensor inconvenience ...

Hi, I’m making a example using the mouseOver in each object than can be interactive in the scene, I place here just a simple scene with just an object to show what I’m experimenting with that…
I don’t know why, but the sensor don’t triggers true in some places of the objects, maybe somebody know a trick to “envolve” the object to be well hitted by the sensor.


Something else when the player is a little far, I feel a delay, no well looking blink, I suppouse is normal for the distance (ping-pong effect) …
mouseOverObject.blend (749 KB)

Switch on physics vizualization in game menu. Then you see what the physics sees (=what mouse sensor mesures)

Sorry mate but I dont understand what you want to explain me, some property in Physics tab?

The game menu is in the very top menu, File | Add | Game, It will be under there.

It’s probably to do with Physics, you will see exactly your problem using Monsters method. It’s called ‘physics visualisation’ and can be found underneath the Start Game button (a good bit underneath!). It will be a tick box beside show mouse cursor ect. I suggest changing the box’s physics to convex or concave (to be honest, I forget what it’s called) or triangle mesh. Just play around with it until you get it working.

Thank you for this tools, I’ve never tried it. It don’t fix my problem but can study how is working.

Thanks for guide me, I was thinking than Monster was explain me something about Physics/Object Tab, haven’t seen or read this option int main blender menu

Thanks, activating and playing with the Collision Bounds enhances the behavior, although never works perfect or like i wish but I suppouse is a limit for the distance of the target object with the mouseOver

Fixed: kind of - workaround
http://www.pasteall.org/blend/19427

Problem:
I did not ‘fix’ your problem, I suggested a different method, Rays.
If you look in the top left, it says “Camera RAY?” “TRUE/FALSE”
This works perfectly using basic Logic Bricks.
If you are experienced with Python, just make the Text say ‘Trunk’ when True and ‘Unfocused’ when False. :yes:

It’s perfect!, I don’t know why I didn’t tried before, I was determined in use the mouseOver, but this way for my example is better. Just to clear up, the ray sensor cast from the pivot point of the object or how it really works?. One time I saw a example and look the way to show the ray cast but I’m not remember…

To be honest, I don’t know too much about Rays ‘internal code’ or how they work, I just know how to use them! Thanks to Goran.

This video shows how to ‘display’ the Ray. :slight_smile: Goran also describes Rays quite well. Hope it helps.

Although yes, as far as I know, they are cast from the pivot point, but they don’t use normal co-ordinates [in your .blend, it is -z, even though the camera is facing +x, this is because you rotated the camera from it’s default orientation (alt+r) - looking down].

Here is Blender API on Rays.
http://www.blender.org/documentation/blender_python_api_2_65_10/bge.types.KX_RaySensor.html#bge.types.KX_RaySensor

If the thread is Solved, please Edit your first post Go Advanced, Prefix, Mark as Solved. :wink:

you know mouse over is a ray sensor too?

Yes - but I don’t like calling it that! I consider it a 2D Ray in my head while the Ray sensor feels more 3D to me, also, in my opinion, it works better, and for it’s Logic Brick, a lot can be done. :slight_smile:
I know about most of this stuff thanks to your endless knowledge in your threads!