mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 01:49:07 -07:00
Mouse events bubbling fixed
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user