This site uses cookies! Learn More

This site uses cookies! uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About NocturnalGames

  • Rank
  • Birthday

Profile Information

  • Gender
  • Location:

Recent Profile Visitors

203 profile views
  1. Would you have any idea how i could use this with my mouse position thx for the script btw
  2. like fps, rpg, puzzle what you guys making? thx
  3. Criticism please. thx
  4. thanku ill try and search for it now
  5. i mean like filled with alot of stuff thats all
  6. Im not really sure if this is where i would post this xD, but anyway which way would you guys recommend for a large inventory. I dont expect any code samples even though they would help greatly . Anyway do you guys have any advice on what i should use/where i should start. thx
  7. thx alot i never even thought of doing it like that
  8. using UnityEngine; using System.Collections; public class PlayerCamera : MonoBehaviour { public GameObject player; [SerializeField] private float lookSensitivity = 5; [SerializeField] private float lookSmoothDamp = 0.15f; private float yRotation; private float xRotation; private float curYRotation; private float curXRotation; private float yRotationV; private float xRotationV; void Start() { } void Update () { yRotation += Input.GetAxis("Mouse X") * lookSensitivity; xRotation -= Input.GetAxis("Mouse Y") * lookSensitivity; xRotation = Mathf.Clamp(xRotation, -90, 90); curXRotation = Mathf.SmoothDamp(curXRotation, xRotation, ref xRotationV, lookSmoothDamp); curYRotation = Mathf.SmoothDamp(curYRotation, yRotation, ref yRotationV, lookSmoothDamp); transform.rotation = Quaternion.Euler(curXRotation, curYRotation, 0); } } Hey guys i cant think of how to make the player rotate with my mouse look script. im probably being stupid thx
  9. Thx for the tips ill start adding it now
  10. Thx i was trying to make it as simple as possible
  11. I know its bad xD im still learning. Please give criticism/tips thx .
  12. Hey guys i was just wondering if anyone knew how i could store the last 10 position i was at, so if i right click i can move back to it. thx
  13. using UnityEngine; using System.Collections; [AddComponentMenu("Player/PlayerMovement")] [RequireComponent(typeof(CharacterController))] public class PlayerMovement : MonoBehaviour { [Header("Speed")] public float walkSpeed = 10.0f; public float curMoveSpeed = 10.0f; public float crouchSpeed = 3.0f; public float sprintModifier = 2.0f; [Header("Jumping")] public float gravity = 30.0f; public float jumpHeight = 5.0f; private bool isRunning = false; private bool canSprint = true; private bool isCrouching = false; private float sprintSpeed = 5.0f; private CharacterController controller; [SerializeField] private Transform charHeight; private Vector3 curPos =; void Start() { controller = gameObject.GetComponent<CharacterController>(); curMoveSpeed = walkSpeed; sprintSpeed = walkSpeed * sprintModifier; } void SetRunning(bool isRunning) { this.isRunning = isRunning; curMoveSpeed = isRunning ? sprintSpeed : walkSpeed; } void Update() { if (controller.isGrounded) { curPos = new Vector3(Input.GetAxis("Horizontal") * curMoveSpeed, 0, Input.GetAxis("Vertical") * curMoveSpeed); curPos = transform.TransformDirection(curPos); curPos.y -= gravity * Time.deltaTime; //Crouching functions if (Input.GetKeyDown(KeyCode.C)) { isCrouching = true; canSprint = false; curMoveSpeed = crouchSpeed; charHeight.localScale = new Vector3(1, 0.5f, 1); } if (Input.GetKeyUp(KeyCode.C)) { isCrouching = false; canSprint = true; curMoveSpeed = walkSpeed; charHeight.localScale = new Vector3(1, 1, 1); } //Sprint functions if (Input.GetKeyDown(KeyCode.LeftShift)&& canSprint == true) { SetRunning(true); } if (Input.GetKeyUp(KeyCode.LeftShift)&& canSprint == true) { SetRunning(false); } //Jump functions if (Input.GetButton("Jump")) { curPos.y = jumpHeight; } } controller.Move(curPos * Time.deltaTime); curPos.y -= gravity * Time.deltaTime; } } I've started making this through watching tutorials and looking through the documentation, and i was just wondering before i go to far if there is a better/ more efficient way or any tips and tricks for movement thankyou.
  14. Dont judge first movie ever thx for the support and criticism were working on another one now and trying to make this alot better. For this one we had to rush because we only had one day to do it
  15. Hes Watching you......