Amazing, you have no idea how much your input tutorials have helped me, I was felling so overwhelmed, but now I'm using it in my new projects, thanks a lot and keep it up you are amazing :D
@samyam3 жыл бұрын
Awesome!! Thank you!
@huehuehuehuehuehuehue4 жыл бұрын
I learned a lot from this video, more than some official guides! Thank you, keep up the great tutorials showcasing the code working.
@Kakashi420693 жыл бұрын
You are so good at explaining everything, this is literally gold
@samyam3 жыл бұрын
Thank you so much! :)
@Kakashi420693 жыл бұрын
@@samyam Question, when it comes to making new games, how do you normally prioritize the workload/what would you break apart as like step 1 -> step 2 -> etc? Say you had to do everything by yourself
@samyam3 жыл бұрын
Well first it’s always good to make a game design doc to plan your game and know what you need to implement before hand, then you can use a tool like codecs or trello and prioritize the features based on importance. You can also use sprints like in software engineering to manage the timing of the features. And before delving into the full game sometimes it’s useful to make a prototype to make sure the game is actually enjoyable and makes sense.
@Kakashi420693 жыл бұрын
@@samyam Thanks; would you say most of the game design is from the coding on fuctionality or creating the assets/graphics? (or equal in time/development, or something else completely?)
@samyam3 жыл бұрын
Game design is a mixture of the whole game in its entirety, you can have great mechanics but most people won’t play a game if the graphics are horrible or don’t make sense with the plot or mechanics. It’s a mixture of everything and taking it into account. I’m actually reading a book called Designing Games which is pretty good and explains the process on how experience game devs approach game design (still haven’t gotten there in the book).
@jonathanjblair4 жыл бұрын
I honestly don't know why you don't have more views and subs. You cover interesting topics and explain what you are doing extremely well. Only thing you should watch is the number of times you say "and then" (I have the same issue with saying So next we). In any case, don't get discouraged, you are making fantastic content. People will find it.
@samyam4 жыл бұрын
Thank you so much! I'll definitely keep that in mind 👍
@turkeyjerkey3 жыл бұрын
Great job! Have you considered extending this tutorial to include showing the movement range for the player by highlighting tiles in the Tilemap (e.g., for a turn-based game)? Thanks for all your excellent tutorials!
@samyam3 жыл бұрын
Thanks! That's a great idea, I hadn't thought about it. I would like to make some more isometric videos in the future, I'll keep it in mind, thanks!
@KaneOnYoutube3 жыл бұрын
You nailed this! Love the tutorial- can't wait to expand on the basic concepts and (hopefully) make something truly impressive!
@НикитаМарибор4 жыл бұрын
Thanks for using the new input system. So little video about it.
@samyam4 жыл бұрын
Thanks for watching!
@DurboxX4 жыл бұрын
Please keep doing isometric tutorials. There is almost no content about isometric and im super interested. I want things like how to do NPCs or battle events? whatever you can teach!! Thanks in advance and keep up the good work! Also I have tried your tutorial but it appear as error that says "variable map has not been assigned". You said on the video that we have to reference it in the editor but how and where is that ? xD I started unity like yesterday and don't know even the most basic things.
@samyam4 жыл бұрын
In the inspector you have to assign your tilemap to the Game Object which you attached the script. You can drag and drop your map there. I'll keep in mind the suggestion for future videos. Glad you enjoyed!
@richardw29774 жыл бұрын
It's been several years since I've worked with Unity. This was helpful in a number of ways. Awesome tutorial. Thank you for sharing your insight.
@UnofficialFoneE3 жыл бұрын
I could be wrong, but to stop the shaking you should set the position of your character using the rigidbody.position property and not the transform.position. What is likley happening is you are setting the position of the player inside/into a collider and then the rigidbody is seeing its inside the collider and then moving character back. This likely causes the shaking and should stop if you instead us the Rigidbody2D component.
@Dexter-rx3xg2 жыл бұрын
Waaaw my first time see a vry vry clear tutorial. Thank you sso mach 👍🏼
@lucianbodnaresku65682 жыл бұрын
This video Is really usefull, It resolved all my problems thank you so much keep going!!
@MoonLiteNite4 жыл бұрын
Awesome, another video with the new input system!
@astronuggie3 жыл бұрын
I know this old but I'm so desperate. I implemented this and it works great, but I'm trying to figure out how to animate my character's sprite in 4 directions as they move. Could you make something like that PLEEEEASE??
@samyam3 жыл бұрын
I don’t currently have a video on it but this video covers it pretty well and the project download link is in the description kzbin.info/www/bejne/qqrapWyqhNqVe7s
@yomerrallo12 жыл бұрын
I might be a bit late for this but... What would need to change to have the player anchored (in movement) to the middle of each tile? So that the movement acts like FF tactics for example.
@samyam2 жыл бұрын
This function may help :) docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.GetCellCenterWorld.html
@zhongmanzhang19254 жыл бұрын
Like your Tutorial! Concise but informative! Thank you!
@PrinceArtanis4 жыл бұрын
Need the next iso tut please samyam. how to walk only on tiles and not anywhere? how to pathfinding then? please continue
@samyam4 жыл бұрын
You can have different layers for walkable tiles and check if you can walk on it before moving. I'll add more isometric tutorials to my list for future videos!
@PrinceArtanis4 жыл бұрын
@@samyam tyyy
@janpaweii31152 жыл бұрын
thats awesome and you are really skilled. some more isometric, maybe physics in isometric 2d.
@dand69292 жыл бұрын
hey, thank you so much for your videos, you got a new sub here :) your videos are really helping me!
@samyam2 жыл бұрын
Thank you! Glad they help :)
@weepees6013 Жыл бұрын
Wow :( When my unity reset I lost everything from my scene that I was working on from the last video..... and it made me do it over again, and I did it faster and better than the first time. However now I'm stuck again. I can't get my character to move at all. I feel like I've followed all instructions to a T and it's not working.
@MonoJaviX2 жыл бұрын
Hi Sam, excellent tutorial, I followed the previous one where you showed how to do the tilemap and this one for the movement, but when I hit the play button in Unity, my capsule doesn't move and I get no errors. I was trying to debug it but I can't find a way to do so. I checked the code and the steps in the video many times and all seems to be exactly the same, how can I find out why is not working? is there a way to check if my mouse click is being captured and what position is being sent to the script? Thank you very much for your time making this video!
@Kakashi420692 жыл бұрын
Idk if you figured it out but I had a similar problem. My fix was you have to make sure your Z axis on the tilemap is 0 for transform position and Main Camera to -1 for Z axis for transform position with the cylinder also on 0 for Z axis.
@GustOfLuck3 жыл бұрын
thx again to help so much
@hantingqin60652 жыл бұрын
Hi, I am getting this error when trying to use your code: InvalidOperationException while executing 'performed' callbacks of 'Mouse/MouseClick[/Mouse/rightButton]' Is there any chance you'd know why this is happening?
@francescoconcari15442 жыл бұрын
Greta video! Is there a way to round the input.mouseposition values, in pederz to center the player in the grid?
@samyam2 жыл бұрын
Thanks! There is GetCellCenterWorld function that you can use docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.GetCellCenterWorld.html
@adamkarolin4 жыл бұрын
Thanks for great tutorial. I had one problem with mouse position, when ScreenToWorldPoint(mousePosition) I get all time camera position. After when I change mousePosition as Vector3 and set z axis of camera coordinates that's solved my problem. I have no clue why my script works different.
@samyam4 жыл бұрын
In the docs they specify to provide the depth as the z for the screen to world position function. It has to do with how your camera is aligned (orthographic vs perspective) answers.unity.com/questions/599097/need-help-understanding-screentoworldpoint.html
@marinatedbadger39393 жыл бұрын
me just tryna get some new inspiration for a game mr beast and honey be like "no no no get distracted lol"
@mihaistanciu24873 жыл бұрын
Hi there! Really nice video. Can you give us some direction on how to implement NavMeshAgent for that, please?
@samyam3 жыл бұрын
There’s no built in way for 2D nav mesh, you’ll have to use a package of make your own. NavMeshPlus is a good package here: github.com/h8man/NavMeshPlus
@BanyoPK3 жыл бұрын
I'm doing the same thing, but got by ScreenToWorldPoint and couldn't catch the mousePosition, will pause the video, continue doing it by myself and wen finish go back to compare. Great tutorial :D
@samyam3 жыл бұрын
Thanks! For screen to world point make sure your game plane is at 0 z position, and that the mouse position you are passing into the function has the camera near plane distance to the plane for the z axis. In this case you can pass in the camera near plane distance to the function as it does here in the example: docs.unity3d.com/ScriptReference/Camera.ScreenToWorldPoint.html
@daialencar71764 жыл бұрын
Great content, keep the job
@boggo38482 жыл бұрын
Thanks a lot for your great video. I have all of this working but annoyingly (as in your video) the sorting between the character and the tilemap pieces, especially when you go behind a tile doesn't work correctly and I've just scoured the internet for a solution with no success.
@WildPork Жыл бұрын
It's hard to tell what your problem is, but I think for the Collision layer, she instructed to changed the Y offset of the Tilemap Collider 2D to 0.5. This pushes the collider above the tile, so when you go behind it, you hit it when you shouldn't. Just reset it back to zero so it actually covers the tile.
@JackyTran3 жыл бұрын
Another awesome straightforward tutorial! Thank you!
@jaicarey70234 жыл бұрын
This tutorial is awesome, thank you very much! Really happy with this new system from Unity, I remember having to do all of this mouse position and clicks manually, so much cleaner! Thank you!
@daSenfgurke4 жыл бұрын
Is there something predefined to make the character move along the tilemap? Meaning some pathfinding for the 2D space of the ground tiles?
@samyam4 жыл бұрын
There is yet no built in way, but there are some github packages you could use. Here’s a forum that could help: forum.unity.com/threads/navmesh-and-tilemaps-pathfinding.609445/
@andidroid64654 жыл бұрын
thank you you are really good. You are the next Brackeys :)
@Mystical-TEDDY_3 жыл бұрын
But what about like just keyboard movement for 4 or 8 directions
@samyam3 жыл бұрын
I have a video for grid movement, it's not isometric but it should work similarly kzbin.info/www/bejne/j5_agKKuqcyNh6s
@letsplaynay99364 жыл бұрын
How do I change the character costume depending on the direction they are facing
@samyam4 жыл бұрын
You can get the direction from the input and depending on the direction you set the Animator component to a different value. Here is a video that might help: kzbin.info/www/bejne/qqrapWyqhNqVe7s They also have the project available for download in the description and they have a function that converts direction to an animation index
@sanoopmenon60324 жыл бұрын
This was really helpful. Is there a way toh get position of isometric z as y on click? I was unable to get position of elevated tiles.
@samyam4 жыл бұрын
Hi seems like you need to add an offset, here is a thread that might help (answer is at bottom) forum.unity.com/threads/clicking-on-tiles-with-an-isometric-z-as-y-tilemap.660238/
@horazcing4 жыл бұрын
Thank you so much for this tutorial!
@PandaNuker3 жыл бұрын
Really really awesome! Watching in 2021. Thanks a lot ! Question: I get a non-blocking error when I run the script, NullReferenceException: Object reference not set to an instance of an object. Any idea why? I'm new here
@samyam3 жыл бұрын
If you double click the error it will take you to the line where the error is. That means you are trying to access something that doesn't exist, or you forgot to set a variable/reference somewhere in your code.
@jesseharrington8284 жыл бұрын
This was really helpful! I'm just starting with unity and I recently made a tilemap with lots of elevations. I'm wondering if you have a video on how to make the character jump to a higher elevation or possibly climb.
@samyam4 жыл бұрын
I personally don't have a video on that but Unity has a video which might help: kzbin.info/www/bejne/a2WXq5qsgNOVgcU It involves making a collider tilemap for elevations. They have the project assets in their description as well.
@jesseharrington8284 жыл бұрын
samyam thank you so much! That’s really helpful
3 жыл бұрын
I did everything but my character don't move when I click :s
@samyam3 жыл бұрын
Maybe you can try setting a breakpoint to see what is getting called. Also, remember to enable your controls in the OnEnable() function.
3 жыл бұрын
@@samyam When I move the Character manually changing the X Y values in play mode, it moves again back to the starting point
@samyam3 жыл бұрын
@ Hmm, make sure you aren't overriding any values somewhere. You can also join our discord and post in the #help channel with your code or more detailed explanation of your issue so we can help better :)
@jesseharrington8284 жыл бұрын
Hello, is I have my character moving and bumping into things but the colliders are a little bit janky. Specifically the character can walk on the sides of my isometric tiles and I want it to only be able to walk on top. Is there a fix for this?
@samyam4 жыл бұрын
You could remove the destination if it hits a collider (oncollisionenter) stopping the jankiness. What do you mean by walking on the sides of the tiles; do you want the character to jump over? Maybe this might help for that kzbin.info/www/bejne/a2WXq5qsgNOVgcU
@jesseharrington8284 жыл бұрын
samyam basically it’s walking on bottom part of the isometric tiles. It’s a grass block, so it starts to walk onto the dirt part on the sides which I don’t want
@samyam4 жыл бұрын
You can adjust the grid properties to shift it over making sure it's only on the grass, make sure your tiles are the correct aspect ratio. The video I sent you previously also might help
@SaSeshen4 жыл бұрын
I typed everything line by line that you did but my variables never actuated which prevented the code from executing as expected. What am I doing wrong or differently? I also happen to have a different version of Unity, so should I simply update the version of unity I am working on or is something else? for instance when we created the private Vector3 destination; destination never turned light blue at any point in the script.
@samyam4 жыл бұрын
I have a Godot theme enabled in VS Code which which is why some of my colors may be different than yours. Make sure you have intellisense working which helps the code editor recognize the code words. Also make sure to look at your console for any errors in your script. I have a video on setting up vs code here if that helps kzbin.info/www/bejne/aoi6iWWVqb-oa7M
@ParanoYa11174 жыл бұрын
I have used this tutorial to create a isometric game with wasd as the control scheme. I have a problem with the tile colliders. It actually takes the outer most edge of the tile texture for the collision shape. Though on the grass blocks it actually should only be the grass. Now my character can move on the cobblestone beneath the grass blocks which looks weird. I'm not sure whether I've the wrong physics settings or something like that. I would appreciate any help!
@samyam4 жыл бұрын
kzbin.info/www/bejne/aHXWfHaAqKqtiaM at 3:25 I believe is the setting you want where you can select your own collider type, however I don't fully understand the question without seeing it, if you'd like we have a Discord channel where you can post in the help channel what's happening discord.gg/SwCKB3Q
@CarbonTaxLOL Жыл бұрын
my object doesnt appear in the camera even though it appears in the scene, I have no error messages in the code. The right click doesn't work? Wish I could just send files across, anyway nice tutorial. Not sure why my shit ain't working.
@lm75864 жыл бұрын
What's the reasoning behind using the new input system? Is it better than the old one?
@samyam4 жыл бұрын
It’s easier to adapt and customize, for example you can create different control schemes and have the same code work for any control scheme, great for cross compatibility. If you need to change a control you don’t need to dig much through the code, you can just change your input asset.
@huyenbhoang4 жыл бұрын
Hi, thanks for the tutorial! I have a question. I created 3 copies of the character, and when I click to move to a destination, the 3 copies merge into one dot stacked on top of each other when they arrive at the destination. How do I prevent this? I'd like them to have some resemblance of spacing between each other. Thanks!
@samyam4 жыл бұрын
Kind of hacky but you can put the copies as children to the main game object with an offset so that it'll move with the main character. Or you can calculate that offset manually depending on which copy they are.
@huyenbhoang4 жыл бұрын
@@samyam ahh. I keep thinking if I added a collider to each of them they would not overlap. I’ll try to figure out your two hacks :)
@veindesigns3 жыл бұрын
Great videos, Does this work with Isometric Z as Y?
@samyam3 жыл бұрын
Thanks! I haven't tested it with Isometric Z and Y, however it seems the recommended function for that is grid.WorldToCell instead of map.WorldToCell answers.unity.com/questions/1622564/selecting-a-tile-with-z-as-y-isometric-tilemaps.html forum.unity.com/threads/clicking-on-tiles-with-an-isometric-z-as-y-tilemap.660238/
@veindesigns3 жыл бұрын
@@samyam OMG You are a legend! You don't know how many web pages i've looked at in the last 24hrs and didn't come across these :S - Guess I need to start searching Unity's forums specifically! Thanks for the quick reply!
@samyam3 жыл бұрын
No worries! Unity forums and answers are where it’s at!! Also, I just searched unity isometric z as y click in google and those were some of the top searches.
@makc36824 жыл бұрын
Hello! Thanks for the videos. I dont understand how i can do mobile joystick with animation of character in Isometric tilemap using the new input system. Where l can lern about it?
@samyam4 жыл бұрын
Mobile Joystick with NEW Input System kzbin.info/www/bejne/j4eYfIKQfdh8sJY Animator Controller kzbin.info/www/bejne/Z33PYpmvZ6qYnrc Animator Controller Scripting kzbin.info/www/bejne/aXLHYqqoaNZ1iNk Instead of moving in 3D just move in a 2d space (x and y).
@nirvanna214 жыл бұрын
Is there any way to make it snap to the grid after movement has taken place?
@samyam4 жыл бұрын
You can calculate where the center of the current tile should be and move it there docs.unity3d.com/ScriptReference/Tilemaps.Tilemap.GetCellCenterWorld.html
@nirvanna214 жыл бұрын
@@samyam Thanks a lot, it's a very informative video btw!
@gfversusbf3 жыл бұрын
Thanks for this tutorial, new to Unity and this is a good tutorial! However, followed both videos to the latter and for some reason the tilemap seems to be dropping out of the sky! The player then cant move correctly, any advice? Cant seem to figure it out! Thanks
@samyam3 жыл бұрын
Make sure to make the rigidbody static or disable it’s gravity + freeze position and rotation 🙂 Since it’s a physics object it’ll drop with gravity if you don’t disable it
@gfversusbf3 жыл бұрын
@@samyam literally worked that out a minute before seeing this comment! Thanks for the tutorial it was great!
@xaleu3 жыл бұрын
thanks for the tutorial, it helped, if anyone is wondering how to move to the exact grid cell you clicked in the center like I needed to you can use GetCellCenterWorld from the map like this, destination = map.GetCellCenterWorld(gridPosition); Im new to unity and it took me a while to figure it out as I found no mention of this on several places I looked
@yomerrallo12 жыл бұрын
This helped a lot actually. Thank you.
@LucasAlfare4 жыл бұрын
Very good! Also, Do you have any video showing how to properly setup VS Code to Unity?
@samyam4 жыл бұрын
This is the video I used kzbin.info/www/bejne/laecnpZpmciqj6c
@JVDBERGHE3 жыл бұрын
Your videos are really helpful and are very clear. I am however having a problem with the "mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);" part I am receiving this error message: "NullReferenceException: Object reference not set to an instance of an object TargetAimer.Update () (at Assets/Scripts/TargetAimer.cs:33)" I have tried to fix it by making a refrence to a camera but when I hit play it unasigns the camera somehow Is there any advice you would be able to give me to solve this error?
@samyam3 жыл бұрын
Make sure your camera is tagged as Main in the inspector, also you should keep a reference to avoid making a lot of Camera.main calls
@JVDBERGHE3 жыл бұрын
@@samyam Thank you for replying. The error message is now gone but my mousePosition is now always the value of the center of the screen What can I do about this?
@samyam3 жыл бұрын
Probably because you should pass into the function the distance from the camera near plane to the object you want to cast against. I usually set the camera near plane next to the 2d scene (or right on it as long as it doesn’t cut off) and pass in cameraMain.nearClipPlane for the zed axis in the vector3 that i’m passing in docs.unity3d.com/ScriptReference/Camera.ScreenToWorldPoint.html Here you’ll see the function takes a vector3
@JVDBERGHE3 жыл бұрын
@@samyam It took me a little while until I completely understood but I managed to solve it. Thank you very much for your aid. The way you respond to people who need help is very usefull, keep up the great work!
@samyam3 жыл бұрын
Nice glad I could help! 😄
@joaolourenco5499 Жыл бұрын
How come you are not using a Player Input component and still works!? 🙈
@samyam Жыл бұрын
The PlayerInput component is a wrapper, you don’t need it to use the Input System
@referol51183 жыл бұрын
Hi, I'm from Russia, why do I have a map selection and Movement Speed in my Inspector
@samyam3 жыл бұрын
If you made the variable public or private w/ SerializeField they will appear in the inspector
@SteveBlues873 жыл бұрын
But how do you get the sprite to move on the isometric path? Nobody seems to know how to do this as every isometric tilemap video I've watched, the sprite just moves diagonally and not isometrically.
@samyam3 жыл бұрын
It would be similar to grid movement which I have a video for. And just make sure you are moving in the correct direction in relation to the size of the cell. For example to move sideways with a cell size of (1,.5) you’d need to move .5 left or right on the x axis to get to the center of the next cell and etc. Let me know if that helps. kzbin.info/www/bejne/j5_agKKuqcyNh6s
@crijogos4 жыл бұрын
Hello, teaches you how to create a movement similar to minecraft dungeons, where he follows the mouse and rises 1 square in height, thanks
@samyam4 жыл бұрын
Hi I'm a bit confused are you requesting a tutorial or just saying what the tutorial is about?
@crijogos4 жыл бұрын
@@samyam Sorry, I'm not very good at English. Could you do a tutorial on the isometric movement like minecraft dungeons, where he can follow the click of the mouse and climb 1 square in height?
@samyam4 жыл бұрын
Minecraft isn't isometric but you can easily make the player move through elevations just by changing their position to go on top of the elevation through a passable area. Heres a great link for more information blogs.unity3d.com/2019/03/18/isometric-2d-environments-with-tilemap/
@flexmachine22804 жыл бұрын
Respect! Привет из России))
@aikou28863 жыл бұрын
Somehow this looks easier than the input system.
@samyam3 жыл бұрын
It does use the input system though! 👍
@aikou28863 жыл бұрын
@@samyam I meant the other input system video (the one that uses directional keys), sorry.
@wonderwaffle73434 жыл бұрын
Hey its me BlueWolf. Long time no see lol
@samyam4 жыл бұрын
Hope you've been well!
@MuriloMielke4 жыл бұрын
Does the 'character' has to be a 3d object to this to work? It's a weird concept to put it as 3d since the game is 2d, lol
@samyam4 жыл бұрын
Not at all, I just added a capsule to show how to movement works
@mikethegamedev4 жыл бұрын
Nice!!!!!!!!!!!!!!!!
@mikethegamedev4 жыл бұрын
12:00 my own bookmark!
@marcelruetters4 жыл бұрын
oh man, i would love learn to use unity, but i am so scared of learn programming
@samyam4 жыл бұрын
It's not too bad! I have a beginner series here Unity Beginner Mini-Series kzbin.info/aero/PLKUARkaoYQT178f_Y3wcSIFiViW8vixL4 Where you don't need to know programming, but it will help. Unity also has their own scripting course for free on their website learn.unity.com/project/beginner-gameplay-scripting
@Ivcifer3 жыл бұрын
you're amazing!
@kevincallanan31263 жыл бұрын
So your previous video was fantastic on creating an isometric tilemap but this tutorial 23 seconds in there is already a problem.. searching for "input system" in the package manager gives me a nice big list of NOTHING. And please if someone says to look in the asset store for it then also include which one as there's a MASSSSSIVE list to choose from
@samyam3 жыл бұрын
Hm, Did you select the Unity Registry at the top? That will show the list of packages Unity provides docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Installation.html
@kevincallanan31263 жыл бұрын
@@samyam >< Don't I feel like an idiot now it was set to show my assets probably something I changed at some point and didn't even know or forgot about. Guess after today I will never make this mistake again as they say live and learn.... Thank you