Hello,
in the documentation for the .addLocalRotation() method we use Scene.scheduleRepeating() to add a rotation for each frame. If you want to stop the rotation you can add a check and stop the update loop (Scene.scheduleRepeating()) calling the .dispose() method if the check doesn't pass. Here is a little commented example on how you may do it:
var man = Scene.createItem('LP_Man', 0, 0, 0);
var rad = 0; // radians total
var dr = 0.01; // radians delta
var limit = Math.PI * 0.5; // radians limit
var update = Scene.scheduleRepeating(function() {
if(rad >= limit) update.dispose() // if total radians exceeds limit => stop update loop
// for each frame add dr to total radians and rotate object by dr around local vector
rad += dr;
man.addLocalRotation(0, 0, 0, 0, 0, 1, dr);
}, 0);
Here we're rotating an object around the local vector (0, 0, 1) for PI/2 radians (90°), then we stop it. Here is the example in action:
https://cospac.es/P2BQ
In general, you should use .addLocalRotation() if you want to rotate an object around itself. Also, in CoSpaces all angle measurements are in radians, not in degrees. I hope this helps.
Benjamin