|
This script is parented to the arm gameobject to make so that when you move your mouse the arms move a little ahead of the camera and then settle back to be aligned with the camera. The problem is that when I move my mouse the arms flip randomly between what I want and being randomly flipped 180 degrees around the Y-axis. This is a modified MouseLook script from standard assets.
(comments are locked)
|
|
Problem fixed. The script posted above works as intended, it just glitched out because of another script.
(comments are locked)
|
|
So, let me get this straight- you want the arms (and gun) to follow the mouse-look directly, but you want the camera to lag behind a little? How about this. Instead of modifying the mouselook script directly, put the mouselook script on the arms, and leave the camera completely seperate. Then, add a new script to the camera, that follows the rotation of the arms! This way, the camera doesn't need to exactly know when the arms are moving, but it will still act the way you want it to. the script that is posted is attached to the arms and the camera and character still have the default mouselook script.
Mar 12 '12 at 12:56 AM
scipiothegreat
Right. Well, I must say, that wasn't really obvious. In any case, I think you've got it the wrong way around- the arms need to use the default FP camera controller, and the camera needs to be slaved to them. This way, the arms will always be where the player points them, but the camera can lag behind a little.
Mar 12 '12 at 01:06 AM
syclamoth
(comments are locked)
|
