|
This is probably quite easy, but I've been banging my head against the wall for a while now, using the in game assets scripts, (mouse lookat and stuff) I just can't seem to find a script that will do the following: I want a camera.position to follow my carcamera.position, inside the cockpit, but when the user presses MOUSE1, the camera will pan around allowing the user to look around, but then when the user releases mouse1, the camera lerps back to it's "default position" (straight ahead) I figure it's something to do with LookAt, but beyond that I get a bit stuck... As I'm pretty poor at 3d maths... If anyone could point me at a script that does something similar, that'd be great.
(comments are locked)
|

Have you had a look at the default MouseLook script?
Yes, I've had a look at the MouseLook Script, but that seems to rotate round an axis - which isn't quite what I'm after...
I'm using this code:
function LateUpdate () { // Horizontal
argh, that didn't help...
:(