mouse over broken

OK, so I started a game project and began building a more specific GE using the blender GE logic bricks.

I started in 2.49b but encountered several problems with the rasterizer (so I upgraded to 2.65 and had the same problems)

1: the Mouse Sensor’s ‘mouse over’ and ‘mouse over any’ do not work at all, infact if you cople ‘mouse over’ with any other sensor that sensor will become non-working.

2: in 2.49b I got a .py script for an FPS style mouse look feature (aka use the mouse’s movement to control the camera’s rotation. it works BUT a huge problem is created, the script creates a non-visual ‘replacement mouse’ and kicks the original mouse pointer off the game screen making it bounce around on the edge of the game screen.

the script is native to 2.42 so I suspect it doesn’t work correctly in 2.49b for that very reason, also the script doesn’t work at all in 2.65.

so my second issue is, what is the correct (available) rasterizer syntax for 2.65?

I would appreciate any help

btw heres the script I’m using (it works with the mouse movement sensor):


######################################################
#
#    MouseLook.py        Blender 2.46
#
#    Tutorial for using MouseLook.py can be found at
#
#    www.tutorialsforblender3D.com
#                                                                                                         
######################################################

# import Rasterizer
import Rasterizer

# get controller
controller = GameLogic.getCurrentController()

# get the object this script is attached to
player = controller.getOwner()

# Get sensor named Mouse
mouse = controller.getSensor("Mouse")
   
# Get the actuators
lookLeftRight = controller.getActuator("LookLeftRight")
lookUpDown = controller.getActuator("LookUpDown")  

# get width and height of game window
width = Rasterizer.getWindowWidth()
height = Rasterizer.getWindowHeight()
     
# define mouse movement function
def mouseMove():
    
   # distance moved from screen center       
   x = width/2 - mouse.getXPosition() 
   y = height/2 - mouse.getYPosition()
      
   # intialize mouse so it doesn't jerk first time
   if hasattr(player, 'mouseInit') == False:
      x = 0
      y = 0
      # bug in Add Property
      # can't use True.  Have to use 1
      player.mouseInit = 1
      
   # return mouse movement
   return (x, y)

# get mouse movement from function
move = mouseMove()

# set mouse sensitivity
sensitivity = 0.001

# Amount, direction and sensitivity
leftRight = move[0] * sensitivity
upDown = move[1] * sensitivity

# set the values
lookLeftRight.setDRot( 0.0, 0.0, leftRight, False)   
lookUpDown.setDRot( upDown, 0.0, 0.0, True)

# Use them
GameLogic.addActiveActuator(lookLeftRight, True)
GameLogic.addActiveActuator(lookUpDown, True)

# Center mouse in game window
Rasterizer.setMousePosition(width/2, height/2) 

I really need the Mouse over function fixed! how do I get it to work properly? (I’m trying to use it for menu objects) do the objects have to be directly in front of the camera? or can they be at a distance?

Hello
well, it works for me?!
In the “Resources” forum you can get more recent scripts/templates!
Bye

thanks. I’ll probably download a premade .blend with the mouseover function working, then we’ll see if theres still a problem.

hmm got it to work all the sudden.

Update Update Update!:

for anyone else who has this problem; you can’t have anything in front of the object that you set to mouseover regardless of the object’s GE settings. even if it’s invisible and ghost it still blocks mouseover.