opa gostei bastante do seus cursos a udemy, gostaria de saber se teria a possibilidade de fzer um curso como abse um mmrpg, se animar pagoa te vlaor integral sem os descontos da udemy
@@diegobob2 desisti de gravar no geral mesmo, muito trabalho e eu não acabo não gostando muito do resultado. Só de vez em nunca um videozinho pro youtube agora
How do I use for the Send Message behavior ? I try to replace the GetKeyDown with the new Input System, I watch a lot of tutorials but nobody explain me how to use it on an other script
usually using Send Message is not the best since it ends up sending message to a ton of objects. It's better to have a reference to the other script(making it public then drag and drop in the inspector or maybe using GetComponent) and then call the method you want directly
Normal don't take to account your velocity (direction), so it's not best solution. Besides if you go top-down sides are switched (locally). And it's easy to get confused. Fast.
Dude, thanks so much. Super simple, just quickly demonstrating the issue and demonstrating the solution(s) with a nice, clear example. People like you are why I almost always trust debugging videos from people with <1000 subs. You're one closer to passing that threshold, though. ;)
why do all videos show this method, it is WRONG. if you press and hold the button then performed is kept as true until you let go (canceled) this is not the same as getbuttondown but is instead the same as getbutton which returns true for as long as it is held. the only real difference is that with g t button it stays on true even if you release the button unless you call getbuttonup to cancel it. get buttondown DOESN'T hold true as long as it is kept held down. it switches to false after less than a second. get button: press = true, release does nothing (it stays true). get button down: press = true then switches to false. get button up: press does nothing, release sets true. started: press = true, release does nothing (stays true) - this is like get button. performed: press = true, release = false. - this is NOT the same as get button down as releasing it is what changes it's boolean, it doesn't do it itself. cancelled = press does nothing, release triggers true - this is the same as get button up. Unity REALLY messed up with this one. the closest you can get is by setting the interaction as press only THEN it works similar to get button down.
Thanks, You helped me a lot! That's a quick and simple fix!! I have a game where you can use abilities and I needed a cooldown system! Thanks again! I thought this would be a pain in the a$$ to do.
I figured out the problem. I had the transition from death to an "exit" node. I made an empty state and transitioned to that, and now the character is destroyed after the death animation ends. Thanks for providing this tutorial. This method of destroying after death animation was pretty hard to find. I'm surprised at how hard it was to figure this out.
hmm, really doesn't seem to want to do anything either way. ive set the flags to none as you show in the UI, has no effect. when i try to change color during runtime it immediately flashes back to white tried setting it in the code exactly as you did, no change in color. doesnt matter if i do it before, after, or during my placement of the tile not sure what other info to include, just seems determined to not work
This is great! I was using an invoke based method with a timer before, it would still have a little bit of variance where it'd delete the object too soon once in awhile. This is so much better and cleaner. Thank you!
Yeah, I was having a similar issue. This seems like such a simple thing to state, but every time I saw a question like this the people waffled around and never just said .canceled would work.
How would I add something like this to a script like the following to do 3 more things? 1) Avoid objects, 2) avoid other NPCs and 3) move toward a more direct player and not get confused if two players are in the same scene/ public class WanderNPC : MonoBehaviour { public float movSpeed; public float rotSpeed = 100f; private bool isWandering = false; private bool isRotL = false; private bool isRotR = false; private bool isWalking = false; Rigidbody rb; private void Start() { rb = GetComponent<Rigidbody>(); } private void Update() { if (isWandering == false) { StartCoroutine(Wander()); } if (isRotR == true) { transform.Rotate(transform.up * Time.deltaTime * rotSpeed); } if (isRotL == true) { transform.Rotate(transform.up * Time.deltaTime * -rotSpeed); } if (isWalking == true) { rb.transform.position += transform.forward * movSpeed; } } IEnumerator Wander() { int rottime = Random.Range(1, 3); int rotwait = Random.Range(1, 3); int rotatelorR = Random.Range(1, 3); int walkwait = Random.Range(1, 3); int walktime = Random.Range(1, 20); isWandering = true; yield return new WaitForSeconds(walkwait); isWalking = true; yield return new WaitForSeconds(walktime); isWalking = false; yield return new WaitForSeconds(rotwait); if (rotatelorR == 1) { isRotR = true; yield return new WaitForSeconds(rottime); isRotR = false; } if (rotatelorR == 2) { isRotL = true; yield return new WaitForSeconds(rottime); isRotL = false; } isWandering = false; } } don't mind if you write it in. Maybe make a tutorial like this to which we can add animations for humanoid type bots later??
Hi, I am trying to rotate an object back to its default position when I release a key using the below line of code but if I use Time.deltatime or Time.time it snaps quickly and if I use Time.fixedDeltaTime it gets stuck transform.rotation=Quaternion.Slerp(transform.rotation,Quaternion.identity,rotationResetSpeed*Time.fixedDeltaTime); Any help would be appreciated
you should use this instead: docs.unity3d.com/ScriptReference/Transform.RotateAround.html Or if you want to use the rigidbody docs.unity3d.com/ScriptReference/Rigidbody.MoveRotation.html