Commit 35e4fbd0 authored by rockyl's avatar rockyl

修复pivot的问题

parent ccb9cd2a
......@@ -120,7 +120,7 @@ export default class InteractComponent extends ScillaComponent {
* @param e
*/
hitTest(e): boolean {
const matrix = this.transform.getMatrix(false, true, true);
const matrix = this.transform.getMatrix(true, true, true);
matrix.transformPoint(e.x, e.y, this.localPos);
let result = false;
......
......@@ -209,7 +209,7 @@ export default class Transform extends ScillaComponent {
const parentTransform: Transform = entity.parent.getComponent(Transform);
if (parentTransform) {
this._renderAlpha = parentTransform._renderAlpha * this.alpha;
_globalMatrix.concat(parentTransform.getMatrix(false, false));
_globalMatrix.concat(parentTransform.getMatrix(true, false));
} else {
this._renderAlpha = this.alpha;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment