Hey! I’m new to the play canvas. I was going through my 1st project (the default project by play canvas) while playing with the project, I tried to rotate one of the platform using script using setLocalEularAngle but I see some weird behavior, it seems like only the mesh is rotating but not the collider.
Can someone help me with this issue. I have attached my script with this topic.
var MyScript = pc.createScript('myScript');
MyScript.attributes.add("num",{type:"number"});
MyScript.attributes.add("platform",{type:"entity"});
// initialize code called once per entity
MyScript.prototype.initialize = function() {
};
// update code called every frame
MyScript.prototype.update = function(dt) {
console.log(this.num);
if(this.platform)
this.platform.setLocalEulerAngles(30, 45, 60);
//console.log(this.gameobject.rotateLocal.y);
};
is there some how i can shar you the project.