Mouse events bubbling fixed

This commit is contained in:
Yaski
2012-07-24 19:50:45 +06:00
parent bddeffa66a
commit 18c0e916b8
3 changed files with 3 additions and 5 deletions

View File

@@ -236,14 +236,12 @@ public class Camera3D extends Object3D {
// Check if object of hierarchy is visible
if (root.visible) {
globalMouseHandlingType = 0;
// Calculating the matrix to transform from the camera space to local space
root.cameraToLocalTransform.combine(root.inverseTransform, localToGlobalTransform);
// Calculating the matrix to transform from local space to the camera space
root.localToCameraTransform.combine(globalToLocalTransform, root.transform);
if (root.mouseEnabled) globalMouseHandlingType |= root.mouseHandlingType;
globalMouseHandlingType = root.mouseHandlingType;
// Checking the culling
if (root.boundBox != null) {
calculateFrustum(root.cameraToLocalTransform);

View File

@@ -1523,7 +1523,7 @@ package alternativa.engine3d.core {
// Calculating matrix for converting from local coordinates to camera coordinates
child.localToCameraTransform.combine(localToCameraTransform, child.transform);
if (child.mouseEnabled) camera.globalMouseHandlingType |= child.mouseHandlingType;
camera.globalMouseHandlingType |= child.mouseHandlingType;
// Culling checking
if (child.boundBox != null) {
camera.calculateFrustum(child.cameraToLocalTransform);

View File

@@ -196,7 +196,7 @@ package alternativa.engine3d.objects {
// Calculation of transfer matrix from local space to camera.
child.localToCameraTransform.combine(parent.localToCameraTransform, child.transform);
if (child.mouseEnabled) camera.globalMouseHandlingType |= child.mouseHandlingType;
camera.globalMouseHandlingType |= child.mouseHandlingType;
// Pass
child.culling = parent.culling;
// Calculating visibility of the self content