I need help arranging a sequence of planes in a circular formation, all facing toward the center. However, I seem to be experiencing issues with the rotation after crossing the 180-degree mark. While my objects are correctly positioned around the circle, the rotation is not behaving as expected. Below you can find a screenshot and the code snippet that I am using. Can anyone identify what might be causing this problem?
var circleRadius = 12;
var diameter = circleRadius*2;
var centerX = -5;
var centerZ = -2.5;
var mpi = Math.PI/180;
var startRadians = startAngle + mpi;
var totalSpheres = 8;
var incrementAngle = 360/totalSpheres;
var incrementRadians = incrementAngle * mpi;
for ( var i = 0; i < totalSpheres; i ++ ) {
var xp = centerX + Math.sin(startRadians) * circleRadius;
var zp = centerZ + Math.cos(startRadians) * circleRadius;
var camObj = new THREE.Mesh( new THREE.PlaneGeometry( 1*camSize, .75*camSize ), material );
camObj.position.x = xp;
camObj.position.z = zp;
camObj.rotation.y = i*incrementAngle; //MH - do this without degrees
console.log(camObj.rotation.y);
startRadians += incrementRadians;
scene.add( camObj );
}