fix: fixed the 3-level parenting (the rotation problem)
This commit is contained in:
parent
9203bd1e79
commit
ca0e87b4d1
1 changed files with 3 additions and 1 deletions
|
@ -140,6 +140,7 @@ func (t *Transform) Rotation() Float {
|
|||
|
||||
func (t *Transform) Rotate(add Float) {
|
||||
t.dirty = true
|
||||
t.parentDirty = true
|
||||
t.rotation += add
|
||||
}
|
||||
func (t *Transform) Around() Vector {
|
||||
|
@ -201,7 +202,8 @@ func (t *Transform) MatrixForParenting() (Matrix, Matrix) {
|
|||
if t.parent != nil {
|
||||
pm, pmi := t.parent.MatrixForParenting()
|
||||
m.Concat(pm)
|
||||
mi.Concat(pmi)
|
||||
pmi.Concat(mi)
|
||||
mi = pmi
|
||||
}
|
||||
|
||||
return m, mi
|
||||
|
|
Loading…
Reference in a new issue