Click to Move Unity C# Script

preview_player
Показать описание
In this Unity tutorial I show you how to move a character in an environment by using a click to move logic with a C# Script.

I add a navmesh to the environment and a navmeshagent component to the character which makes implementing this feature very easy, also with mecanim animations Idle and Running.

Here are the assets I used for this with links to the Unity assetstore:

Toon Soldier character:

Lowpoly Environment pack:

See my social profiles here

#unity3d
#unity
#gamedev
#clicktomove
Рекомендации по теме
Комментарии
Автор

Very proper tutorial, no mouth breathing, concise and to the point and I learned something. well done sir you have a new sub.

felixsnag
Автор

Honestly I watched this without sound, it was fast, precise and I actually learned something. Thanks!

ElDiablo
Автор

One of the best Unity tutorials I've seen on YouTube!

ellmatic
Автор

thank you I didn't know we had to set the angular speed this high!

OPOP-qlkq
Автор

Wow.., you explain it in just five minutes.

HowItReacts
Автор

Also edit the camera tag to "MainCamera" if you're having errors like NullReference...etc, since we have referenced Camera.main in the script

wassimrahmani
Автор

Excellent tutorial, direct to the point!

Archidynamics
Автор

That was awesome! no earraping intro, concise, ima sub you!

dorianmccarthy
Автор

Nice tutorial, thanks for keeping it short and to the point :)

cwdgamedev
Автор

Nice presentation compare to other tutorial that I watched I spend half of their video listening to their introduction chit-chat with no relevance to actual things I want to learn. I like the way you make video, you directly pinpoint your subject with fast and informative way in a short period of time.

By the way one quick question I am wondering how can I add jump with navmesh agent? I have noticed that if I add character controller or rigidbodies to my player the movement cancelled out.

Thanks in advance.

Mr.Coldfire
Автор

Thank you so much mate. This is simple but was so useful for my assignment!

dexter
Автор

This was very concise and very useful, thanks a lot!

WRECKCreations
Автор

Hi many thanks to the tutorial, one question issue is why my character running in circle ? it will not stop itself.

DerWiNG
Автор

Simple and Elegant, great tutorial. New sub.

andersencastaneda
Автор

Thanks, your tutorial was quick and i learned a lot of things.

sebasapk_
Автор

I'm pretty sure I did everything correct. I used the code that someone pasted in the comments, and I got the same result. Whenever I click somewhere, the character doesn't move at all. The Navmesh is baked, not sure whats causing the problem. 'Main Camera' is tagged as the MainCamera, and the mesh is static. The idle animation plays fine.

StuffedSFM
Автор

awesome and elegant thanks a lot keep it up

JackKokah
Автор

Thank you very much! very informative and helpful tutorial.

grantkveton
Автор

Great tutorial. I would love a simple tutorial on how to get characters to attack each other and die.

lehula
Автор

Hey bro ! How long did it take you to learn c#? Started some days ago learning

zeroiq
visit shbcf.ru