Пікірлер
@Kayden108
@Kayden108 4 күн бұрын
How do I make a fizzler
@ShortGamerOff
@ShortGamerOff Ай бұрын
ohhhhhhhhhhhhh now i know why tf it looks like win XP. this was made 8 years ago lol
@AgressivePigeon
@AgressivePigeon Ай бұрын
You are a godsend.
@Abelirre
@Abelirre 2 ай бұрын
I just found this tutorial and... wow. Congrats! This is real quality content. So glad I found this video. You are a really good teacher!
@nostalgia7211
@nostalgia7211 2 ай бұрын
Thanks, buddy! Thanks to you, I managed to solve the problem of sliding for surfing.
@epicwhitewolf3668
@epicwhitewolf3668 3 ай бұрын
Great tutorial, I just needed help with the camera and the camera movements feel great.
@curcobane2442
@curcobane2442 3 ай бұрын
gay sex
@ninjaenesteam
@ninjaenesteam 5 ай бұрын
bro is peter griffin
@gameclips5734
@gameclips5734 5 ай бұрын
perfect thanks, seems like everywhere else i looked people were really overcomplicating this
@harrisongoodloe2636
@harrisongoodloe2636 6 ай бұрын
Here is the entire script for those who have already watched the video before and just need the code. If you haven't watched the video I strongly recommend it, as it has excellent visuals and thorough explanations on each thing. using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] Transform playerCamera = null; [SerializeField] float mouseSensitivity = 3.5f; [SerializeField] float walkSpeed = 6.0f; [SerializeField] float gravity = -13.0f; [SerializeField] [Range(0.0f, 0.5f)] float moveSmoothTime = 0.3f; [SerializeField] [Range(0.0f, 0.05f)] float mouseSmoothTime = 0.03f; [SerializeField] bool lockCursor = true; float cameraPitch = 0.0f; float velocityY = 0.0f; CharacterController controller = null; Vector2 currentDir = Vector2.zero; Vector2 currentDirVelocity = Vector2.zero; Vector2 currentMouseDelta = Vector2.zero; Vector2 currentMouseDeltaVelocity = Vector2.zero; // Start is called before the first frame update void Start() { controller = GetComponent<CharacterController>(); if(lockCursor) { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } } // Update is called once per frame void Update() { UpdateMouseLook(); UpdateMovement(); } void UpdateMouseLook() { Vector2 targetMouseDelta = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y")); currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime); cameraPitch -= currentMouseDelta.y * mouseSensitivity; cameraPitch = Mathf.Clamp(cameraPitch, -90.0f, 90.0f); playerCamera.localEulerAngles = Vector3.right * cameraPitch; transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); } void UpdateMovement() { Vector2 targetDir = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); targetDir.Normalize(); currentDir = Vector2.SmoothDamp(currentDir, targetDir, ref currentDirVelocity, moveSmoothTime); if (controller.isGrounded) velocityY = 0.0f; velocityY += gravity * Time.deltaTime; Vector3 velocity = (transform.forward * currentDir.y + transform.right * currentDir.x) * walkSpeed + Vector3.up * velocityY; controller.Move(velocity * Time.deltaTime); } }
@birdystream8734
@birdystream8734 8 ай бұрын
bruh it dont damn work
@dynamicvoltage9765
@dynamicvoltage9765 8 ай бұрын
If you're already shooting a ray down, you might as well just set the player to the ground by measuring the distance to the floor. By adding extra gravity you run the risk of changing the speed at which the player moves.
@yttriun
@yttriun 8 ай бұрын
thank you
@mentiyYT
@mentiyYT 9 ай бұрын
3 years
@Sned6699
@Sned6699 10 ай бұрын
9:37 where im at making this comment
@minimastudios_
@minimastudios_ 10 ай бұрын
im concerned for this guy, hope hes ok, anyone know?
@MRJakeyBro
@MRJakeyBro 11 ай бұрын
It keeps crashing when hammer opens
@hyperxbeast1218
@hyperxbeast1218 11 ай бұрын
Idk if u get rgis comment i still need to watch the other video but can u do coop with is or is it more harder
@cliffordbamert7728
@cliffordbamert7728 11 ай бұрын
great video, it totally explains the concept of lerp in a clear way. the visuals helped me a lot grasp the content. thanks
@scottmedhaug4107
@scottmedhaug4107 Жыл бұрын
wow that was a great video. at one part the code was so low the computer graphics got in the way but other than that it was easy to read. thank you so much
@marinosdimitriou3902
@marinosdimitriou3902 Жыл бұрын
Amazing illustration and explanation. Thanks.
@jamesnewo8131
@jamesnewo8131 Жыл бұрын
My indicator tick texture is mirrored, anybody know how to fix that?
@Gabriel-no6wv
@Gabriel-no6wv Жыл бұрын
This is perfect.
@little_man5926
@little_man5926 Жыл бұрын
[Serializefield] Trasnform playercamera = null;
@andiwolf3334
@andiwolf3334 Жыл бұрын
this was great thanks :)
@root0062
@root0062 Жыл бұрын
Bro you proper smart, thank you. Explained the work better than my prof. I hope you got a good job somewhere, cause you deserve it !!
@Arsenics25
@Arsenics25 Жыл бұрын
Good video. I can’t English well but I can understand it. Thank you.
@saadaamir4933
@saadaamir4933 Жыл бұрын
Loved the video quality and your way of explaining the complex topic is such easier way.
@anneonyme4618
@anneonyme4618 Жыл бұрын
This is the best video I ever seen, to explain a subjet that's seen so absract at first. Continue like this ❤
@felipedeoliveiraclaudio6039
@felipedeoliveiraclaudio6039 Жыл бұрын
When i only knew how to talk english, i din't realize he was british, i Just thought he had a funny voice
@dot23X
@dot23X Жыл бұрын
really helpful and allowed me to regain some sadly lost confidence in Unity skills!
@redinkdemon
@redinkdemon Жыл бұрын
Doesn't work for me. my editor recognized nothing.
@jehriko7525
@jehriko7525 Жыл бұрын
Thank you for not moving too fast and giving nice descriptive animations and graphics of each thing you're programming so it's actually able to be learned and not just copied!
@Thepatty_Minecraft
@Thepatty_Minecraft Жыл бұрын
Best tutorial
@Wheatleybuggygames
@Wheatleybuggygames Жыл бұрын
hey uh i have an issue that none of the hammer tutorials explain you see that tool bar on the left its not there on my end.
@indica.lunatic
@indica.lunatic Жыл бұрын
Thank you, your tutorial it's so clear, So I can clear my school project
@lowHP_
@lowHP_ Жыл бұрын
wow, thanks for the great video
@dcat1832
@dcat1832 Жыл бұрын
how to jump?
@ClicketyGamer
@ClicketyGamer Жыл бұрын
this is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] Transform playerCamera = null; [SerializeField] float mouseSensitivity = 3.5f; [SerializeField] float walkSpeed = 6.0f; [SerializeField] float gravity = -13.0f; [SerializeField][Range(0.0f, 0.5f)] float moveSmoothTime = 0.3f; [SerializeField][Range(0.0f, 0.5f)] float mouseSmoothTime = 0.03f; [SerializeField] bool lockCursor = true; float cameraPitch = 0.0f; float velocityY = 0.0f; CharacterController controller = null; Vector2 currentDir = Vector2.zero; Vector2 currentDirVelocity = Vector2.zero; Vector2 currentMouseDelta = Vector2.zero; Vector2 currentMouseDeltaVelocity = Vector2.zero; // Start is called before the first frame update void Start() { controller = GetComponent<CharacterController>(); if(lockCursor) { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } } // Update is called once per frame void Update() { UpdateMouseLook(); UpdateMovement(); } void UpdateMouseLook() { Vector2 targetMouseDelta = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y")); currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime); cameraPitch -= currentMouseDelta.y * mouseSensitivity; cameraPitch = Mathf.Clamp(cameraPitch, -90.0f, 90.0f); playerCamera.localEulerAngles = Vector3.right * cameraPitch; transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); } void UpdateMovement() { Vector2 targetDir = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); targetDir.Normalize(); currentDir = Vector2.SmoothDamp(currentDir, targetDir, ref currentDirVelocity, moveSmoothTime); if (controller.isGrounded) velocityY = 0.0f; velocityY += gravity * Time.deltaTime; Vector3 velocity = (transform.forward * currentDir.y + transform.right * currentDir.x) * walkSpeed + Vector3.up * velocityY; controller.Move(velocity * Time.deltaTime); } }
@EricBalcon
@EricBalcon Жыл бұрын
At least one good tutorial about lerp in unity, I would have been perfect to talk about slerp and also about smooth or editing the interpolation curve.
@vjgoutham
@vjgoutham Жыл бұрын
Very well explained. I am new to Unity and trying to understand Lerping. This is the best video I found on Lerping. Good Job Acacia Developer.
@anticcx2410
@anticcx2410 Жыл бұрын
Best video ive ever seen
@anticcx2410
@anticcx2410 Жыл бұрын
Been 2 years. Waiting for episode 2 :)
@Ivhie
@Ivhie Жыл бұрын
Bro where is the rest of episodes? :(
@tokyoweeb1523
@tokyoweeb1523 Жыл бұрын
2years and I’m still waiting for part 2
@kylemorely1812
@kylemorely1812 Жыл бұрын
how come you use [serializedfield] instead of public?
@stylie473joker5
@stylie473joker5 Жыл бұрын
Because public will allow other scripts to access the variable which if you have a lot of scripts will make your code less performant, on the other hand [serializefield] will only expose the variable in the inspector and it will still be private
@alexpurification1260
@alexpurification1260 Жыл бұрын
What if i want private variables and still i want to access other scripts variables then get, set method is ideal?
@pixelart0124
@pixelart0124 Жыл бұрын
Thank you for this simple and working solution! I wanna add that you can put movementSpeed in place of the 1.0f inside the clamp. Same result, simpler code.
@RegenerationOfficial
@RegenerationOfficial Жыл бұрын
fuck yea
@haritharajeev7108
@haritharajeev7108 Жыл бұрын
Assets\playercontroller.cs(48,29): error CS0019: Operator '*' cannot be applied to operands of type 'Vector3' and 'Vector3' i got this error when i had to the movement of the fpc.. idk what to do