|
I used the generic orbit camera script and tweaked it to only rotate 90 degrees when either the left or right arrow key are pressed. It works well, the only thing now is I'd like to get it to kind of swing around as opposed to instantly snapping to the position. I've read most of the other questions regarding orbiting objects but I'm pretty new to unity and don't really know how to apply them to my situation. Here's the code: )
(comments are locked)
|
|
Add this to your camera: Good luck with the project! Works like a charm! Much appreciated. I'm going to try and read through it to make sure I understand what's going on.
Jun 13 '12 at 07:13 PM
Falantar
No problem, it's my pleasure!
Jun 13 '12 at 07:40 PM
Sokco816
I noticed that the angle (y-axis) slightly diminishes each time the camera rotates. You can test it better by setting the speed up higher, like to about 10. I also noticed that the camera will rotate twice occasionally. Any idea on what might be the issue?
Jun 13 '12 at 07:51 PM
Falantar
The camera sometimes rotates twice because it is moving so quickly, that it actually misses it's goal rotation and has to move on to the next goal rotation. To get it more precise, you can try changing to and to
Jun 14 '12 at 01:17 AM
Sokco816
(comments are locked)
|
