[ad_1]
I attempted to rotate for round movement impact of node like under.
let origin = Quat.rotateZ(new Quat(),new Quat(), 0);
this.node.rotation=Quat.rotateZ(new Quat(), origin, angle * Math.PI/180);
It is labored properly but when i add rigidbody2D within the node it’s not working in another way.
I can’t know the rationale.
I attempt to set 2D Physics System to builtin and it’s working accurately however gravity will not be working.
Let me know Why the rotation habits is totally different if rigidbody2D is added.
The Builtin 2D physics system solely has collision detection, inflexible our bodies don’t work for the Builtin 2D physics system. You can confer with: 2D RigidBody · Cocos Creator
What your imply of rotaion habits is totally different? Can you present the distinction you see?
Looks just like the rotation methodology can’t deal with positions between -90 and +90 levels
begin() {
let check = 0.1
setInterval(() => {
const rotation = this.node.getRotation();
console.log(rotation);
this.node.setRotation(new Quat(0, 0, check));
check += 0.1;
}, 1000)
}
[ad_2]