Commit 1738e611 authored by rockyl's avatar rockyl

修复锚点没对子集生效的问题

parent 79e4440c
...@@ -63,6 +63,9 @@ export default class Transform extends ScillaComponent { ...@@ -63,6 +63,9 @@ export default class Transform extends ScillaComponent {
*/ */
@dirtyFieldTrigger @dirtyFieldTrigger
pivot: Vector2D = new Vector2D(0.5, 0.5); pivot: Vector2D = new Vector2D(0.5, 0.5);
/**
* 旋转
*/
@dirtyFieldDetector @dirtyFieldDetector
rotation = 0; rotation = 0;
...@@ -179,7 +182,7 @@ export default class Transform extends ScillaComponent { ...@@ -179,7 +182,7 @@ export default class Transform extends ScillaComponent {
const parentTransform: Transform = entity.parent.getComponent(Transform); const parentTransform: Transform = entity.parent.getComponent(Transform);
if (parentTransform) { if (parentTransform) {
this._renderAlpha = parentTransform._renderAlpha * this.alpha; this._renderAlpha = parentTransform._renderAlpha * this.alpha;
_globalMatrix.concat(parentTransform.getMatrix()); _globalMatrix.concat(parentTransform.getMatrix(true));
} }
}else{ }else{
this._renderAlpha = this.alpha; 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