DaniDevy / FPS_Movement_Rigidbody

A physics based movement system
MIT License
492 stars 642 forks source link

Gun resizes with player #25

Open CoderAkshat227 opened 3 years ago

CoderAkshat227 commented 3 years ago

Hey so my gun(cube) is resizing when I crouch, but in your tutorials it doesnt. ANY WAY I COULD FIX THAT?

mor-uto commented 3 years ago

There is an easy fix i put the orientation and the player camera inside the Player Game Object Remove The Camera From The Player And Copy This Code Into A C# Script And Name The Script CameraController And Put The Script Onto The Camera

using UnityEngine;

public class CameraController : MonoBehaviour {

 public Transform Player;

 private void Update () {
 transform.position = Player.position;
 }

}