forked from bartvdbraak/blender
BGE: Fix for T43980 MouseLook (actuator) triggers MouseMovement (sensor)
on other objects permanently only trigger mouse event when it is necessary, this way we avoid conflicts with other mouse sensors.
This commit is contained in:
parent
3db0e1ef6a
commit
73ad76970e
@ -278,7 +278,10 @@ bool KX_MouseActuator::Update()
|
||||
setposition[1] = center_y;
|
||||
}
|
||||
|
||||
setMousePosition(setposition[0], setposition[1]);
|
||||
// only trigger mouse event when it is necessary
|
||||
if (m_oldposition[0] != position[0] || m_oldposition[1] != position[1]) {
|
||||
setMousePosition(setposition[0], setposition[1]);
|
||||
}
|
||||
|
||||
m_oldposition[0] = position[0];
|
||||
m_oldposition[1] = position[1];
|
||||
|
Loading…
Reference in New Issue
Block a user