Alexander Zotov#unity2dmovement #unitymovecharacter #unitytopdown In this video I show you a very simple way to move a character by steps pressing up down left and right arrows keys.
Need a Mechanical Keyboard? Just check this one out! Redragon K552 Mechanical Gaming Keyboard amzn.to/3jEwiQ4
Here is my empty project. I set it up quickly. First I add a cell. Duplicate it and put it with a step of 1.75 to the right by X axis. That will be a distance of one step in my case. Duplicate it again and put it to the right with another step of 1.75. And so on. Duplicate a cell and position it using that step. Duplicate the whole row and put it here. Duplicate it one more time and put it here. A kind of board is ready. Now to organize my hierarchy a bit I create a new empty. Rename it as cells. Reset its transform. Select all of my cells and D&D them in this cells game object. Great! Next game object is a character. To make it appear in front of my board I set Order in layer to 5. Character will have a script. Here it is. This script helps me to move my character by steps. So when Up Down Left or Right arrow button is pressed my character makes a move in corresponding direction with that step ща 1.75. Pretty simple. Script goes to character. Now let’s hit play and see how it works. I press arrow keys and my character makes his moves.
2D Top Down Grid Based Movement | Move Character By Steps In A Game Made With Unity SoftwareAlexander Zotov2021-08-09 | #unity2dmovement #unitymovecharacter #unitytopdown In this video I show you a very simple way to move a character by steps pressing up down left and right arrows keys.
Need a Mechanical Keyboard? Just check this one out! Redragon K552 Mechanical Gaming Keyboard amzn.to/3jEwiQ4
Here is my empty project. I set it up quickly. First I add a cell. Duplicate it and put it with a step of 1.75 to the right by X axis. That will be a distance of one step in my case. Duplicate it again and put it to the right with another step of 1.75. And so on. Duplicate a cell and position it using that step. Duplicate the whole row and put it here. Duplicate it one more time and put it here. A kind of board is ready. Now to organize my hierarchy a bit I create a new empty. Rename it as cells. Reset its transform. Select all of my cells and D&D them in this cells game object. Great! Next game object is a character. To make it appear in front of my board I set Order in layer to 5. Character will have a script. Here it is. This script helps me to move my character by steps. So when Up Down Left or Right arrow button is pressed my character makes a move in corresponding direction with that step ща 1.75. Pretty simple. Script goes to character. Now let’s hit play and see how it works. I press arrow keys and my character makes his moves.Tutorial How To Move Rotate and Control 3D Object With Arrow Keys in Unity Software GameAlexander Zotov2022-02-04 | In this video I show you a simple C# script that allows you to make a 3D game object move and rotate if you arrow keys. Up and Down keys are for move forward and backward. Left and Right keys are for rotate left and right. So you will be able to create some unity control feature. You press arrow keys on your keyboard and any game object with script attached will be able to move and rotate. Any character or player can be controlled using this simple technique.
Thank you :-)Tutorial How To Move 3D Object With Finger Swipe In Mobile Unity Software Game Android Or iOSAlexander Zotov2022-02-03 | In this video I show you a simple C# script that allows you to make a 3D game object move if you swipe your finger up down left or right by the screen of your mobile device (Android or iOS ones). So you will be able to create some unity touch control feature. You drag your finger up down left or right and any game object with script attached will be able to move in the corresponding direction. Any character or player can be moved using this simple technique. So here we create quite useful touch input feature.
Thank you :-)Tutorial How To Jump 3D Object With Swipe By The Screen In Mobile Unity Software Game Android Or iOSAlexander Zotov2022-02-02 | In this video I show you a simple C# script that allows you to make a 3D game object jump if you swipe your finger up by the screen of your mobile device (Android or iOS ones). So you will be able to create some unity touch control feature. You drag your finger up and any game object with script attached will be able to jump. Any character or player can jump using this simple technique. So here we create quite useful touch input feature.
Thank you :-)How to select game objects with mouse click and destroy them with UI button in Unity software gameAlexander Zotov2022-01-30 | In this video I show you a simple way how to select one or severat game object with mouse click and how to destroy selected objects pressing UI button. Selected game objects will be highlighted with red selection sign.
Thank you :-)How to destroy several game objects one by one in sequence in Unity software game pressing UI buttonAlexander Zotov2022-01-29 | In this video I show you a simple way how to destroy several game objects one by one pressing UI button once. Destroy coroutine is used here along with FindObjectsOfType method.
Thank you :-)Simple Clock Puzzle Game Made With Unity SoftwareAlexander Zotov2022-01-28 | In this video I create a very simple clock puzzle game with Unity software. In this game you have to set correct time to win the game using a hint.
Thank you :-)How to create simple animation for game object | Unity software tutorialAlexander Zotov2022-01-27 | In this video I show how to create a simple animation for a game object. Rotation and scale will be animated.
Thank you :-)Simple Magnifying glass feature for 2D game made with Unity softwareAlexander Zotov2022-01-20 | In this video I show you how to make a simple magnifying glass feature for your 2D game In Unity software.
Thank you :-)Change sprite from small to big and vice versa with mouse click in Unity software 2D gameAlexander Zotov2022-01-20 | In this video I show you a simple way how to switch game objects sprite from small to big and from big to small with mouse click. Unity software tutorial.
Thank you :-)Click gameobject to make it big and small | Change scale with mouse click in Unity software gameAlexander Zotov2022-01-19 | In this video I show you a very simple C# script that will help you to make it big and small when you click it with mouse.
Thank you :-)Mobile Phone Vibration And Character Shaking Feature For Your Android Game Made With Unity SoftwareAlexander Zotov2021-12-10 | In this video I show you a simple way how to make your Android or iOS phone vibrate when you touch some game object (a cute character in this case). A character in its turn starts to shake randomly when you touch it. Cool and simple feature for Android or iOS mobile game.
Project files here drive.google.com/file/d/1VPRP2dgoo7O_k4nvik108mI5iwLfAqpj/view?usp=sharingMake Simple New Year Puzzle Game For Android Mobile Platform With Unity Software | TutorialAlexander Zotov2021-12-09 | In this video, I create a simple puzzle game for the Android mobile platform. In this game, you have to drag and drop several new year's toys to the Christmas tree to recreate a reference picture and complete the puzzle. When all of the toys are in their correct places the game is over and you win. Happy New Year!
Thanks to vecteezy.comSimple Android Game For Kids Made With Unity Software For Mobile Platform | Xylophone GameAlexander Zotov2021-11-22 | In this video I create a simple educational game for kids for Android mobile platform. Unity software is used. You touch a note on xylophone and a tone sound of it is played.
Project files here drive.google.com/file/d/1MFDTYkf1UIvUaUlLK-qAou0pzlETMZU-/view?usp=sharingTutorial How To Move & Control 3D Object With UI Buttons Up Down Left And Right In Mobile Unity GameAlexander Zotov2021-11-19 | In this video I will show a simple way how to move a 3D object with help of UI buttons You will be able to move a game object Up Down Left And Right. Simple and Useful move script is here.
Project files here drive.google.com/file/d/1gSM8D6Xp_ewM-OY8a4Zi3gCymwGSUqL_/view?usp=sharingJump From One Waypoint To Another | Simple Moving Cycle Or Loop For 2D Game Made With Unity SoftwareAlexander Zotov2021-10-09 | In this video I will show you how to create simple waypoint system for your 2D Unity game. So character or enemy can perform its movement from one waypoint to another within its own walking loop using simple coroutine.
Project Files Here drive.google.com/file/d/10dhhsv-UnG4KPorh1vuO2E9idHMMCD8k/view?usp=sharingHow To Make Simple Educational Puzzle Game For Kids For Android Mobile Platform With Unity SoftwareAlexander Zotov2021-10-08 | Hi! In this video I create a simple educational puzzle game for kids for android mobile platform. It is kind of find differences one. So you have to find differences between two pictures to win the game.
Project files here drive.google.com/file/d/1HTmHQKjMwgqFvClH3Y6fgIB7r6MGVZ4O/view?usp=sharingMake Game Object Visible And Invisible With Finger Touch Or Mouse Click In Unity Software GameAlexander Zotov2021-10-07 | In this video I show a very simple C# script that allows you to make a game object visible and invisible with finger touch or mouse click. This approach works well both on Android iOS Mobile platform and on Standalone Platform.
Project files here drive.google.com/file/d/1-9Na8zQZLgWydihvhtoYwG342-z7_pjY/view?usp=sharingMove Game Object With Finger Swipe Up And Down In Android Mobile Game Made With Unity SoftwareAlexander Zotov2021-10-01 | Here is a very simple script to move your character or any gameobject up and down with finger swipe in android mobile game made with Unity software.
Thank you :-)Lets play!Alexander Zotov2021-09-06 | Hi there! Welcome to my stream! Have a good time!
Rules for the chat and comments section are simple: be polite, be good, be yourself, NO CAPS PLEASE, no dirty words, respect each other. Ban comes unexpectedly and forever. See? FOREVER! And ever!
Thank you!Move Game Object With Finger Swipe Left And Right In Android Mobile Game Made With Unity SoftwareAlexander Zotov2021-09-03 | Here is a very simple way to move your character or any gameobject left and right with finger swipe in android mobile game made with Unity software.
Project files here drive.google.com/file/d/1t7rQaBwLkYyJgeI5WZSXtMlIUhqUR46D/view?usp=sharingGyroscope Parallax Effect For 2D Android Or iOS Game Made With Unity SoftwareAlexander Zotov2021-08-19 | #unitygyroscope #unityparallax In this video I show you a very simple way to create super cool parallax effect for you your 2D game made With Unity software. this feature will work both for Android and iOS.
Project Here drive.google.com/file/d/1OOCPegEIF2sWp5RD4pZTvi24U8VAO4nA/view?usp=sharingReduce HP Health Points By Mouse Click | Health Is Zero Player Is Destroyed | Unity 2D TutorialAlexander Zotov2021-08-18 | #unityhealth In this video I show you a simple way to reduce characters health by clicking him. When health points reach zero a character is destroyed.
Project Here drive.google.com/file/d/1S25zwjXtYviWVfkYtrmmYNV-VcLH7nJo/view?usp=sharingDestroy Game Object On Collision Instantiating Explosion Prefab | 2D Unity Software TutorialAlexander Zotov2021-08-17 | #unitydestroy In this video i show you a simple way to destroy 2D game object on collision spawning an explosion prefab. OnTriggerEnter2D method is used here.
Project Here drive.google.com/file/d/1mkBkKETJeoiV5f-rHOY-3tmDKv0rcTEj/view?usp=sharingMove Game Object Clicking It | 2D Unity Software Simple Tutorial | Rocket FliesAlexander Zotov2021-08-17 | #unitymove In this video I show a very simple script that allows you to move any game object clicking it with mouse button. OnMouseDown method also perfectly works on mobile platforms - Android and iOS.
Here is my empty project. Let me set it up quickly. Here I have a character simple sprite sheet. First I need to slice it. Select it. Set sprite mode to multiple. Hit Apply to save toe change and go to the sprite editor. Here I select the automatic slice option and hit the slice button. Make sure slice boundaries outline a picture accurately. Very good. Hit apply to save the changes. Expand the sprite sheet and bring the first sprite to the hierarchy. Here is my character. Let’s create Idle animation first. Select the character and go to the animation window. Hit create new animation. I rename it as Idle Animation. Take a sprite with open eyes and put it to the timeline. Idle animation is ready. Create new clip. This one will be a blink animation. Take the first sprite and put it here. Take the second one and put it here. Take the first one again and put it here. Let’s check it out. Animation runs too fast. Reduce the number of samples down to 10. Hit enter. Let’s see. Ok. Notice that animation duration is about 0.5 seconds. We will need this value in the script. Blink animation is done. Let’s examine the script that will control our animations. Here it is. It’s a pretty simple one. I use coroutine to switch animator states. It's time to blink variable represents the time interval between blinks. So in Update I check if that time interval has passed and if it has then blink coroutine is started. In coroutine I switch to blink animation and in 0.5 seconds I switch back to Idle animation. And after that it's time to blink variable gets a new random interval. between 0.5 and 2 seconds. Script goes to character. Now I can hit play and see how it blinks.Move 2D Game Object With Finger Swipe In Mobile Game Made With Unity Software | Android Or iOSAlexander Zotov2021-08-12 | #unityswipe #unitymove #unityandroid #unitymobile In this video I show you a quite simple script that will help you to move your character or any game object up, down, left and right with finger swipe in a mobile game (Android or iOS). Also a simple animation is implemented.
In the previous videos which you can get by the link in the description I created this simple project. I recommend taking a look at those videos. In this project I can move my character with the arrow buttons of my keyboard. To make it possible to use this movement feature on mobile platforms I modified my script a bit. Here it is. I use a start touch and end touch positions to determine which way my character should go. Coroutine is used here as well. So in the update method instead of reading keyboard input I get touch input. Start touch position is obtained when I touch the screen. End touch position is obtained when I release my finger. And depending on coordinates and differences between those positions a corresponding direction is passed to coroutine which performs the movement and simple animation.Simple Animation For Character Movement In Your 2D Top Down Game Made With Unity SoftwareAlexander Zotov2021-08-11 | #unitymove #unitymovement #unityanimation In this video I show you a quite simple script that helps you to move a character with cool animation.
So in the previous video which you can get by the link in the description I created this simple project. I recommend starting from that video actually. But this video is good enough as well. In that project my character was moving without any animation. So here I created a script that allows me to perform that simple animated movement. Here it is. Here I use a coroutine. Coroutine allowed variable will not let me start a new coroutine while the previous one is still running. Update method. Here, depending on which arrow button I pressed, I pass a direction to coroutine so my character will be moved up down left or right. Coroutine code makes that movement and animation possible. So the first block of code makes my character smaller with three steps of 0.2 and moves my character according to the given direction. The second part of coroutine makes a character bigger back and keeps him moving. The penultimate line of code just gives a character one more step to make it stick to the grid. Script is attached to my character. Hit play and see how cool it is.Enter A Door And Load Next Or Previous Scene Feature For Your 2D Game Made With Unity SoftwareAlexander Zotov2021-08-05 | #unityloadscene #unityenterdoor In this video I show you a simple way to make your character enter a door and load another scene by pressing Enter button on your keyboard.
Needless to say that this is just a classic. I've got one. Logitech HD Pro Webcam C920 amzn.to/3lDe6sr
Let me start from an empty project and quickly set it up. First I create a new scene and rename it as Level 1. Then I duplicate it by pressing Ctrl+D keys and rename this new scene as Level 2. To make it possible to load any scene I need to add it to the build. File - Build settings - select these two scenes and D&D them into this window. Select level one. I need a character to play with. Here it is. Set Order in layer to 5 for example so the character appears above the door. I add rigidbody 2d component that will help my to move my character and detect collisions. Set gravity scale to zero so character will not fall down. Next component will be a box collider 2d. Set it as a trigger and edit it a bit. This collider will detect doors. My character needs a script to move. Here it is. It’s a simple script that allows me to move my character left and right. Script goes to my man. Another script named Enter door helps my to detect doors and enter them by pressing Enter key. So when my character collides with a door ontrigger enter 2d method is invoked. If my man collides with blue door then level 2 should be loaded. If he collides with brown door then level 1 should be loaded. Enter allowed variable is needed to let my man enter a door only if he collides with it. On trigger exit is invoked when my man exits door collider. When it happens enter allowed is set to false. And in Update method I check if enter is allowed and if enter key is pressed at the same time. If those conditions are met then the scene is loaded. Script also goes to man. This character will be spawned every time a new scene is loaded. So to make it possible I need a prefab of my man. D&D him to project folder to create a prefab. This man from hierarchy can be removed. Now I create a door. Here is the blue one. Door needs a collider. Set it as a trigger. Edit it a bit. Each door will be spawning my character. So this Spawn man script will help me with that. So when a scene is loaded a new man is instantiated at the door's position. Serialize field helps me to assign man prefab in the inspector. I’ll do it later. Script goes to blue door. Also blue door will have blue door script which is just empty one that helps my man to identify this door as blue one. Script goes to blue door as well. And finally I add a simple UI text to the scene that just tells me that this is level 1. Level 1 is ready. Save it and select level 2. This level is the same as the first one. So I do the same steps to set it up. Add brown door. Add collider. Add spawn man script and add brown door script which is also an empty one. And add a simple text. The last thing to do is to assign that man prefab to spawn it. Select door and D&D man prefab to this man slot of spawn man script. Save level 2. Select level, select blue door and D&D man prefab to man slot. Save the scene. Now I can hit play and see how it works. I can move my character left and right and step closer to the door and hit enter then the corresponding scene is loaded.Jump On Enemy Head To Stomp Squash And Trample Him. Feature For You 2D Game Made With Unity SoftwareAlexander Zotov2021-08-04 | #unityenemy #unityjumponenemy #unitystompenemy In this video I show you a simple way to stomp enemies jumping on their heads.
Good one! No, I'm serious! USB Gaming Microphone, Risea Computer Condenser PC Mic with Tripod Stand & Pop Filter amzn.to/3rX576y
I start from an empty project as usual. First game object here will be the ground. Ground needs a collider so the player could walk on it. Edit it a bit. Next game object is a player which is a kind of boot. Scale it down a bit. Boot needs a collider to walk on the ground. It is a circle collider. Edit it like so. Next component is a rigid body 2d which helps to move my boot and detect collisions. I set gravity scale to 3 to make the boot fall faster. Set collision detection to continuous for more precise collision detection. And freeze Z rotation to prevent my boot from rolling over. Boot will have a script. Here it is. Script helps me to move my boot left and right and to make it jump. Script goes to boot. Right click on boot and create a new empty child. This game object will detect enemies' heads. Head check needs a collider for that. It will be a trigger. I edit it so it’s positioned right at the bottom of my boot and under that circle collider. Head check will have a script. Here it is. Script has an access to boots rigid body component for the purpose to create that little bouncy effect when the enemy is stomped. Script goes to enemy head check. Select head check and D&D bot game object to boot rigidbody slot. Right click on boot and create another empty child. This game object will be checking if boot collides with enemies body. Enemy check will have a couple of colliders which will be triggers. I edit them like so. Enemy check will have a script. Here it is. So when enemy check collides with an enemy the boot is destroyed. Script goes to enemy check game object. Boot is done. Next game object is the enemy. Scale it down. Put it here. Enemy will have a collider. Set it as a trigger. This collider represents enemies body. So the boot dies if it touches it. To make it work, the enemy will have a script that is just an empty one and it helps Enemy check game object to recognize an enemy. Script goes to enemy. Right click on enemy and create new empty child. This game object represents enemies head. It will have a collider. Set it as a trigger. Edit it so it positioned right above bodies collider. Like that. This game object will have a script. Here it is. So when this game object collides with enemy head check game object attached to the boot enemy is destroyed. This script goes to Boot check game object. Now I can hit play and see how it works. So if boot jumps on enemy then enemy is destroyed. And if boot touches enemies body then boot is destroyed.Adding Tooltip Or Hint Feature To Your 2D Game Made With Unity SoftwareAlexander Zotov2021-08-03 | #unitytooltip #unityhint
Hi! In this video I show you a simple way to add a kind of tooltip to your game. You point to a game object with a mouse and a tooltip with its name appears.
Can you hear that? Amazon Basics USB-Powered PC Computer Speakers with Dynamic Sound amzn.to/3CoT46T
I add an apple a carrot and a pear to the scene. Apple goes here. Pear goes here. Fruits and vegetable need colliders to detect mouse pointer. I select all of them and add a box collider. Set it as a trigger. I need a text for my tooltip. Right click on hierarchy and create new UI text. Rename it as tooltip. Double click to focus on it. Put it about here. Once canvas is created I prefer to set its scale mode to scale with screen size. I edit tooltip object like so. Put it here. Make font bigger. Make object bigger. Put it here. Align it in the middle. Change color. Ok. I don’t need any text initially so I remove it. Now lets see the script that helps to control everything. It’s Plant script which is pretty simple. Here I have tooltip text which will be assigned in inspector. OnmouseEnter method fires up when the mouse pointer is above an object. When it happens tooltip text shows a name of that game object. When the mouse leaves an object (OnmouseExit method is invoked) tooltip text shows nothing. I select all of my plants and add this script to them. Now I need to assign tooltip text. Make sure all of plants are selected and D&D tooltip into this slot. Now I can hit play and see how it works. No text initially. Once mouse pointer is over an object tooltip appears and shows its name.Make A Character Climb A Ladder Up And Down In 2D Game Made With Unity SoftwareAlexander Zotov2021-07-30 | Hi! In this video I show you a simple way to make a character be able to climb a ladder.
Let’s start from an empty project as usual and set it up step by step. First I add some ground to the scene. Make it a bit smaller and position it at the bottom. Ground will have a collider so my character will be able to walk on it. Edit it a bit. Next game object is a ladder. Make it smaller as well and put it about here. Ladder will have a collider which will be a trigger. I narrow it down so the character will climb a ladder only if he is in the middle of it. To detect a collision I add a rigid body to ladder and set it as kinematic one. Next I add a player to the scene. I make him to fit the ladder. Something like that. Also I set order in layer to 1 so player appears in front of the ladder. Player will have a circle collider that allows him to walk on the ground. Edit it a bit. Next component is a rigid body to detect collisions with the ground. I set gravity scale to 3 so player will fall faster. And I freeze Z rotation to prevent the player from rolling over. Player needs something to feel that the ladder is near. Right click on the player and create a new empty child. I rename it as Ladder detector. Put this detector on the players head. There we go. This detector needs a collider to detect a ladder. It will be a trigger. I edit it to make it a bit smaller. Good. Now it’s time to check out scripts that will control of of this stuff. First one is Ladder script. It’s just an empty one and it helps the detector to recognize a ladder. You can use a tag for that purpose but using a script is more versatile for me. Next script is Player script. This script helps me to move my player left and right and up and down if ladder is detected. Climbing Allowed property is responsible for that. This property will be changed by Ladder Detector when it meets a ladder. I switch rigid bodys kinematic option back and forth to prevent sliding effect. Player slowly goes down by the ladder if up or down button is released. And last script is Ladder Detector one. This script has an access to Player script. I can make this connection in the inspector due to serialize field attribute. So when detector meets a ladder the Climbing allowed property is set to true. When detector loses a ladder then climbing allowed is set to false. Pretty simple. Ladder script goes to ladder. Player script goes to player. And Ladder Detector goes to detector. Last thing to do is to make that connection between detector and player by dropping the player into player slot of ladder detector script. Now I can hit play and see how it works. I can move my player left and right and climb the ladder up and down.Secret Password To Continue Playing A Level You Want Feature For Your Game Made With Unity SoftwareAlexander Zotov2021-07-29 | #passwordunity #continuegameunity #loadnextlevelunity Hi! In this video, I show you a simple way to proceed to some level or scene using a secret password. So initially you don’t know the password and you can only begin from level one. From this first level, you can go back to the main menu if you didn’t succeed for example or if you did succeed then you can proceed to level two. Doing this you get a secret password which you can enter in a special field and immediately jump to level two. Completing level two you get the password to level three. Entering that password in the start menu you jump to level three.
Hi! In this video I show you a simple way to create this hit blinking feature when a player gets some damage. I start from an empty project as usual. First I add the player to the scene. Second I add this white blink image which replicates the shape of the player. I make this blink object to be a child of the player. Players' order in layer is zero by default as well as blinks one. So I set blinks order in layer to 1 so it appears above the player. Move the player to the right a bit and add a component which is a box collider 2d to detect collisions. Set it as a trigger and edit it like so. Also I add a rigid body 2d because one of the colliding objects should have it attached otherwise a collision will not be detected. Set the gravity scale to zero so the player will not fall down. Next I add the sword to the scene. Position it about here. Set order in layer to 2 so the sword appears above the blink. Sword needs a collider as well. Set it as a trigger and edit it a bit. Ok. Sword will have a script attached. This is quite a simple one that allows me to move the sword with left and right arrow keys. Here it is. Script goes to the sword game object. The player will also have a script. Here it is. This script allows me to control that blink game object. Serialize field attribute helps me to initialize it in the inspector. In Start method I disable it so blink is invisible initially. OnTrigger enter 2d method is invoked when player collides with the sword. When it happens I invoke two methods. First one enables the blink and the second one disables it in 0.1 second so I have that blinking feature. Pretty simple. Script goes to player. Select player and D&D blink game object into corresponding slot of player script so player game object could control it. Hit play and see how it works. Beautiful. You can download this project by the link in the description but only if you give a like to this video first. Thanks for watching. See you next time.
In this video I give you a simple script that allows your enemy to walk from one wall to another back and forth changing its direction after collision. So enemy turns around when he touches the wall and starts moving in opposite direction. It is a kind of very simple enemy AI.
Oh, yeah! Apple Lightning to 3.5 mm Headphone Jack Adapter amzn.to/3lGaq9t
I start from an empty project and the first thing to do is to add an enemy. Here it is. Enemy needs a collider to collide with a wall. This collider will be a trigger. Also to move and to detect collisions the enemy needs a rigid body 2d. I set gravity scale to 0 so enemy will not fall down. Next game object is a wall. Here is one. I position it at the right side of the screen. Right here. Wall needs a collider as well. I set it as a trigger. Wall will have a script which is just an empty one. This script helps me to make sure that enemy collides with wall. I could use a tag for that purpose but I prefer to use scripts. I D&D this script to wall. Duplicate wall gameobject and position that clone at the left side of the screen. Ok.
Final thing is to check out the enemy script. Here I have some variables which help me to move my enemy and to flip its sprite when the enemy moves to the left or to the right. In Start I get localScale and rigitbody, set dirX to negative one so enemy walks to the left initially and set move speed to 3. Ontrigger enter method fires up when enemy collides with something. If that game object has Wall script attached then dirX variable changes its value to opposite one. And in fixed update I give a velocity to rigidbody depending on that dirX value so the enemy walks left or right. And finally in Late Update I flip enemies sprite depending on where my enemy is heading to. Maybe this approach is a bit overkill but it works pretty well for me everytime. That’s the script. I D&D it to enemy. Now I can hit play and see how it works. Enemy walks from one wall to another facing the direction he goes. You can find project files by the link in the description. Thank you for watching and see you next time.How To Move Two Players At The Same Time And How To Create Two Separate Score Counters In Unity GameAlexander Zotov2021-05-13 | In this video I’ll show you how to create two players which can be moved simultaneously with one keyboard buttons and how to create two different score counters for those players. Blue player is player one, red player is player two in this case. When player one collects a coin then player one score amount is increased and score sign is updated. Same for the player two.
A new puzzle game made with Unity software for Android platform is now available on Google Play Store!
Deceptively simple. Surprisingly addictive.
In this simple (at least some levels are) and relaxing (if you prefer to relax twisting your brain) puzzle (it’s a puzzle for sure) game all you have to do is to blast colored circle targets with rockets. A rocket should have the same color to be able to destroy a target. When all of the targets are destroyed you proceed to the next level. Sounds quite doable, doesn’t it? The only way to find it out is to try it yourself. Joy and some soft brain massage guaranteed! Good luck and thanks for playing! Please don’t forget to give some stars if you like the game.
If you like what I'm doing then you can also support me through www.patreon.com/alexanderzotov or here paypal.me/AZotov Thank you)Move Game Object With WASD Or Arrow Buttons, Aim & Fire With Mouse In 2D Unity Software GameAlexander Zotov2021-03-30 | #unitymove #unityaim #unityfire In this short video tutorial I show you a couple of simple C# scripts that will help you to move a game object (a tank in this case) with arrow buttons or WASD keys of your keyboard and also you will be able to rotate that tank turret with mouse (turret looks towards the mouse pointer). When you click left mouse button a bullet in spawned or instantiated and travels heading for mouse pointer.
Need a cable? I have one! Just kidding. Lots of them! YEFOOT iPhone Charger Cable amzn.to/2X28fCY
Project files are here but Like and Comment first :-) drive.google.com/file/d/1gpQBWPIe54x2c7T6KM80Q_Qud3Mf9P6Q/view?usp=sharingHow To Trigger Animation On Collision And Destroy Game Object After That In 2D Unity Software GameAlexander Zotov2021-03-26 | #unityanimation #unitydestroy #unityontriggerenter In this video I show you a simple way how to run animation when two objects collide. The Dart hits the Balloon and Balloon pops up. When pop animation is over the balloon game object is destroyed. OnTriggerEnter2D and Animator help to make this happen.
Scotch is forever! Scotch Heavy Duty Packaging Tape amzn.to/3AkKlRB
Project files are here but Like and Comment first :-) drive.google.com/file/d/19FcoOuJHBtOep2zK6DxP4HZFFBq7JAP-/view?usp=sharingHow To Create Dynamite Sparkling Fuse Animation With Line Renderer And Particle System In Unity GameAlexander Zotov2021-03-25 | #unityparticesystem #unitylinerenderer #unitydynamite In this video I show you a simple way how to create a dynamite burning and sparkling fuse simple animation with line renderer and particle system for your 2D game made with Unity Software. You can fire the fuse up with left mouse click and when the fuse reaches the dynamite stick the stick explodes. Pretty cool and easy-to-make feature.
Project files are here but Like and Comment first :-) drive.google.com/file/d/17bp6GHTqsAgvWbD0jW3PQw_FWxvTLe8y/view?usp=sharingTurn Particles On And Off With Mouse Click And Place Particles At Mouse Position In Unity GameAlexander Zotov2021-03-24 | #unityparticlesystem #unityparticles In this short video I show you a simple C# script that will help you to turn particle system on and off with mouse click in some simple game made with Unity Software. You click and hold left mouse button down and particle system game object appears at mouse position and starts emitting particles. Once left mouse button is released particle system game object is disabled and stops emitting particles.
I'm sure you need it! Full Motion TV Monitor Wall Mount amzn.to/2VqXpG0
If you like what I'm doing then you can support me through www.patreon.com/alexanderzotov or here paypal.me/AZotov Thank you)Move 2D Game Object With One Line Of Code | Top Down Movement In Unity Software Game | Easy ScriptAlexander Zotov2021-03-24 | #unitymove #unity2dmovement #unitytopdownmove In this very short video I show you a simple C# script with just ONE line of code that allows you to move a game object using arrow keys or WASD keys on your keyboard. This can be used in making some simple 2D top down game with Unity Software.
Great camera for the price! Webcam HD 1080p Web Camera amzn.to/3ysfMbT
Dog is here drive.google.com/file/d/15BHLApxI09U_F0SRfLbxkI3MBeTgp_tu/view?usp=sharing2D Box Selection With Line Renderer And Mouse | Select Objects And Drag Them | Simple Unity TutorialAlexander Zotov2021-03-19 | #unityboxselection #unitydrag In this short video, I show you a couple of simple C# scripts that allow you to make a box selection with a mouse. You can select several game objects and drag them around the scene. Of course, you can drag just one game object as well. Use left mouse button to select objects and right mouse button to deselect or clear selection. 2D Unity game tutorial.
Need a HUB? There it goes! USB C Hub, Hiearcool USB C Dongle, 7 in 1 USB C to HDMI Multiport Adapter Compatible for MacBook Pro USB C Laptops Nintendo and Other Type C Devices (4K HDMI USB3.0 SD/TF Card Reader 100W PD amzn.to/2X0FtTf
Project files are here but Like and Comment first :-) drive.google.com/file/d/1jOd3E4PKKDHcs7dS3ue8PmiHnjAMvvSb/view?usp=sharingHow To Draw Rectangle With Line Renderer And Mouse And Show Its Area With UI Text | Unity TutorialAlexander Zotov2021-03-18 | In this short video, I show you a simple C# script that allows you to draw a rectangle with Line Renderer and Mouse. When a rectangle is done then you can see its area value with help of UI text gameobject.
Project files are here but Like and Comment first :-) drive.google.com/file/d/11s4QgU_-O_6v4x-d5w2Na7G1mEofNlG4/view?usp=sharingDraw Triangle With Line Renderer And Mouse | Get And Display An Area Of It | Unity Software TutorialAlexander Zotov2021-03-18 | #unitylinerenderer #unitydraw In this short and simple video I show you a C# script that allows you to draw a triangle with help of Line Renderer and mouse. When triangle is done an area value of it is displayed by UI text.
Project files are here but Like and Comment first :-) drive.google.com/file/d/1tb0dMDcrlQdI4tea4yQjAVIcwU8HyKoQ/view?usp=sharingSimple Way To Move And Rotate Tank Or Other Game Object In 2D Top Down Game Made With Unity SoftwareAlexander Zotov2021-03-17 | #unitymove #unityrotate #unitymoverotate In this short video I show you a very simple C# script that will help you to move and rotate any game object (a tank in this case) in your top down game using arrow keys or WASD keys. Simple Unity tutorial is on the rescue.
Project files are here but Like and Commend first ;-) drive.google.com/file/d/18XS333Hj3_AQ4vZ5Ci-A--QbAM1jL1Xu/view?usp=sharingHow To Play Sound When UI Button Is Pressed And To Stop Playing Sound When UI Button Is ReleasedAlexander Zotov2021-03-03 | In this short video tutorial I show you a simple way how to play beep sound while UI button is being pressed and how to stop playing that sound when UI button is released.
Project is here but Like and Comment first drive.google.com/file/d/1GA_83zD8GZNDlxaGB99mymShQFnkWOcO/view?usp=sharingHow To Move Game Object Up And Down With UI Buttons In A 2D Game Made With Unity SoftwareAlexander Zotov2021-02-26 | In this video I give you a very very very simple script which allows you to move a gameobject (Rocket in this case) Up and Down.