Okay There is two sence
Sence 1: The game in my computer.
Sence 2:The game in my friend’s computer.
Now, when my friend and I playing in same room, I have problem with the movement system…
The problem is While I move right, My friend’s Player moving right too, but I his sence I see thast just my player is moving!
If he trying too move left, He see me moving left too, But from my sence, I don’t see that my player is moving!
It’s happenning when I walking left\right\forward\backward too!
HOW CAN I FIX THAT PROBLEM?
TNX For helping!. Sorry for bad English
Okay I Fix THAT!
But I have problem with the camera…
My script is “MouseLook”.
I want to make that in my room-server, When there is two player in one room, Two camera will not will makes problem’s.
How can I do that?
It’s the same problem as you had and you will have more later on in the development, a few posts back i advised you to read the docs to understand why you need it. If you understand you would know now what to do.
using UnityEngine;
using System.Collections;
/// MouseLook rotates the transform based on the mouse delta.
/// Minimum and Maximum values can be used to constrain the possible rotation
/// To make an FPS style character:
/// - Create a capsule.
/// - Add the MouseLook script to the capsule.
/// -> Set the mouse look to use LookX. (You want to only turn character but not tilt it)
/// - Add FPSInputController script to the capsule
/// -> A CharacterMotor and a CharacterController component will be automatically added.
/// - Create a camera. Make the camera a child of the capsule. Reset it's transform.
/// - Add a MouseLook script to the camera.
/// -> Set the mouse look to use LookY. (You want the camera to tilt up and down like a head. The character already turns.)
[AddComponentMenu("Camera-Control/Mouse Look")]
public class MouseLook : MonoBehaviour {
public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
public RotationAxes axes = RotationAxes.MouseXAndY;
public float sensitivityX = 15F;
public float sensitivityY = 15F;
public float minimumX = -360F;
public float maximumX = 360F;
public float minimumY = -60F;
public float maximumY = 60F;
public Camera camera = null;
float rotationY = 0F;
void Update ()
{
[COLOR="red"]if(networkView.isMine)[/COLOR]
{
camera.camera.enabled=false;
if (axes == RotationAxes.MouseXAndY)
{
float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
}
else if (axes == RotationAxes.MouseX)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
}
else
{
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
}
}
}
void Start ()
{
// Make the rigid body not change rotation
if (rigidbody)
rigidbody.freezeRotation = true;
}
}
THE PROBLEM IS:
There is:
Player 1—>Camera 1 I Am
Player 2—>Camera 2 Friend
The problem is that when there is in the server-room me and a friend,My camera is his camera, And his camera is Mine! (Player 1—>Camera 2 Player 2—>Camera1 And it’s not good!)
it’s need to be:
Why is like that?
How can I fix that?
How can I do that his camera is his camera and my camera is my camera?
returning to your old habits ?
like we have told you over and over, there is absulutely no point in bumping a thread without additional info.
the solution was given but yet again you fail to understand.