I'm trying to rotate a camera about a point. None of the existing posts in the forum make it clear how to do this. So how I did it was set the camera object yaw, and then apply the camera object. But to my horror. It only recognizes angles from 0->90 and 271->260 (Seriously WTF... wasted god damn 2 hours on this already). Is this a bug or am I doing something wrong?
Snippet of the code.. I've tried with both camera target and no target.. still fails..
Edit: zzzz.... Solved by using CameraSetValue(p,c_cameraValueYaw,i2f(-90+i*45),3,0,0);
instead. Makes no sense why that works but CameraApplyInfo doesnt work..
Edit2: Just discovered when you try to set a cameras Yaw.. it actually pads with 90 degrees. So if i put 45, its actually 135 degrees.. This for example gives 95..
Measuring things based on camera yaw can be bad because around the 0/360 mark theirs a glitch that makes the camera rotation mess up slightly for WASD movement on a unit. I dont know if the same problem will happen in what your doing but I would also look into action: unit is facing (angle) and see if you could also use that.
If you're implying set the camera to follow the direction the unit is facing, it probably won't work for what I'm trying to do. I was playing around with camera choreography. I don't know if the problem I had is the same as the one you had, but at certain angles, yaw would just get stuck facing -90 (towards the bottom of the map) and not move at all. Particularly or the input values of 90 to 270 degrees. But it works perfectly find when the camera set value function is used.. Camera set value basically applies the information instantly, rather than having to wait for the applyinfo command.
Hey all,
I'm trying to rotate a camera about a point. None of the existing posts in the forum make it clear how to do this. So how I did it was set the camera object yaw, and then apply the camera object. But to my horror. It only recognizes angles from 0->90 and 271->260 (Seriously WTF... wasted god damn 2 hours on this already). Is this a bug or am I doing something wrong?
Snippet of the code.. I've tried with both camera target and no target.. still fails..
Edit: zzzz.... Solved by using CameraSetValue(p,c_cameraValueYaw,i2f(-90+i*45),3,0,0);
instead. Makes no sense why that works but CameraApplyInfo doesnt work..
Edit2: Just discovered when you try to set a cameras Yaw.. it actually pads with 90 degrees. So if i put 45, its actually 135 degrees.. This for example gives 95..
CameraInfoSetValue(c,c_cameraValueYaw,5.0);
But this gives 5...CameraSetValue(p,c_cameraValueYaw,5.0,3,0,0);Retarded?.. Yes..f*ckpissshit
Measuring things based on camera yaw can be bad because around the 0/360 mark theirs a glitch that makes the camera rotation mess up slightly for WASD movement on a unit. I dont know if the same problem will happen in what your doing but I would also look into action: unit is facing (angle) and see if you could also use that.
@gamemore: Go
If you're implying set the camera to follow the direction the unit is facing, it probably won't work for what I'm trying to do. I was playing around with camera choreography. I don't know if the problem I had is the same as the one you had, but at certain angles, yaw would just get stuck facing -90 (towards the bottom of the map) and not move at all. Particularly or the input values of 90 to 270 degrees. But it works perfectly find when the camera set value function is used.. Camera set value basically applies the information instantly, rather than having to wait for the applyinfo command.