fix: reset rotation
This commit is contained in:
parent
65f1fe6270
commit
591c1201f4
|
@ -163,11 +163,16 @@ export default class Entity {
|
|||
});
|
||||
}
|
||||
}
|
||||
if (!this.attached) {
|
||||
const {diffuse, normals} = this;
|
||||
diffuse.rotation = 0;
|
||||
normals.rotation = 0;
|
||||
}
|
||||
if (Direction) {
|
||||
const {diffuse, normals} = this;
|
||||
if ('direction' in Direction) {
|
||||
if (!this.attached || 'direction' in Direction) {
|
||||
if (this.entity.Sprite.rotates) {
|
||||
const rotation = Direction.direction + this.entity.Sprite.rotation;
|
||||
const rotation = this.entity.Direction.direction + this.entity.Sprite.rotation;
|
||||
diffuse.rotation = rotation;
|
||||
normals.rotation = rotation;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user