Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 156 bytes modified
parent
4ae737a89b
commit
c3834b0f84
|
@ -184,7 +184,12 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function() {
|
||||||
this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;
|
this.mesh.position.x = this.position.x + GameLib.CustomCode.GRID_OFFSET_X;
|
||||||
this.mesh.position.y = this.position.y + GameLib.CustomCode.GRID_OFFSET_Y;
|
this.mesh.position.y = this.position.y + GameLib.CustomCode.GRID_OFFSET_Y;
|
||||||
|
|
||||||
this.mesh.rotation.z = this.orientation * Math.PI / 2;
|
if (((this.orientation * Math.PI / 2) - this.mesh.rotation.z) > Math.PI) {
|
||||||
|
this.mesh.rotation.z -= Math.PI;
|
||||||
|
this.mesh.updateInstance('rotation');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mesh.rotation.z = this.orientation * Math.PI / 2;
|
||||||
|
|
||||||
if (this.backupMesh) {
|
if (this.backupMesh) {
|
||||||
this.mesh.rotation.z += ((Math.PI / 2) * this.flip);
|
this.mesh.rotation.z += ((Math.PI / 2) * this.flip);
|
||||||
|
|
Loading…
Reference in New Issue