- Joined
- Jun 20, 2014
- Messages
- 605
- Reaction score
- 209
- First Language
- English
- Primarily Uses
I'm kinda new to JS, not really sure why the z-axis is not working.
I have these functions:
Scene_Title.prototype.create_circle_object = function() {this.circle_object = new Sprite(ImageManager.loadTitle1(circle_sym));this.circle_object.x = circle_sym_x;this.circle_object.y = circle_sym_y;this.circle_object.anchor.x = circle_sym_anchor_x;this.circle_object.anchor.y = circle_sym_anchor_y;this.circle_object.opacity = circle_sym_opacity;this.circle_object.z = 999;this.addChildAt(this.circle_object, 3);}And this:
And yet, the "Magic Circle" with z -500 ALWAYS appears over the "Circle Object" with z 999.
What could be happening?
I haven't encountered viewports in JS, otherwise that's my first thought to blame... I tried switching the update order and creation order but nothing.
I have these functions:
Scene_Title.prototype.create_circle_object = function() {this.circle_object = new Sprite(ImageManager.loadTitle1(circle_sym));this.circle_object.x = circle_sym_x;this.circle_object.y = circle_sym_y;this.circle_object.anchor.x = circle_sym_anchor_x;this.circle_object.anchor.y = circle_sym_anchor_y;this.circle_object.opacity = circle_sym_opacity;this.circle_object.z = 999;this.addChildAt(this.circle_object, 3);}And this:
Code:
Scene_Title.prototype.create_magic_circle = function() { this._sprite_mgc = new Sprite(ImageManager.loadTitle2("Magic_Circle")); this._sprite_mgc.x = 50; this._sprite_mgc.y = 50; this._sprite_mgc.z = -500; this._sprite_mgc.anchor.x = 0.5; this._sprite_mgc.anchor.y = 0.5; this._sprite_mgc.opacity = 0; this._sprite_mgc.blendMode = 1; this.addChild(this._sprite_mgc);}
What could be happening?
I haven't encountered viewports in JS, otherwise that's my first thought to blame... I tried switching the update order and creation order but nothing.
Last edited by a moderator:
