If I use it like this:
// IA5_RL_Door is an entity with ModelComponent
ChangeColor.prototype.update = function(dt) {
var element = this.app.root.findByName("IA5_RL_Door");
element.lookAt(this.camera1.getPosition());
}
It works well,But when I use it like this:
// Text_Depth is an entity with Text Element
ChangeColor.prototype.update = function(dt) {
var element = this.app.root.findByName("Text_Depth");
element.lookAt(this.camera1.getPosition());
}
I want it always looks at camera,but it does’t work,this is my hierarchy:
Could you help me,thank you!