- 30
- 2 349 510
Press Start
United States
Registrace 4. 08. 2018
The best place to learn how to make games using Unity software.
Mario Style Camera Follow Tutorial
In this video I show you how to setup a camera to follow your character like Super Mario World.
SUBSCRIBE: bit.ly/2Js78lE
============
SUPPORT: www.patreon.com/pressstartclub
In this video, we cover:
0:40 - Setting up the scene
1:05 - Explaining how a Mario Camera works
1:42 - Calculating Camera Threshold Boundaries
2:30 - Subtracting by our FollowOffset
3:05 - Drawing Gizmos to outline our threshold box
4:05 - Calculating the distance between our character and the center of the camera
5:35 - Defining the new position for the camera
7:10 - Use Vector3.MoveTowards to move our camera
8:10 - Using RigidBody velocity for camera speed
9:20 - Final Product
COPY & PASTE CODE FROM THIS TUTORIAL:
pressstart.vip/tutorials/2019/11/29/105/mario-2d-camera.html
VIDEO SERIES:
Animation: czcams.com/video/Gqel6Ed4LpY/video.html
Running: czcams.com/video/USLp-4iwNnQ/video.html
Jumping: czcams.com/video/RPdn3r_tqcM/video.html
PERFECT DEVICE ZOOM:
czcams.com/video/3xXlnSetHPM/video.html
MORE TUTORIALS:
pressstart.vip/unity-tutorials
SUBSCRIBE: bit.ly/2Js78lE
============
SUPPORT: www.patreon.com/pressstartclub
In this video, we cover:
0:40 - Setting up the scene
1:05 - Explaining how a Mario Camera works
1:42 - Calculating Camera Threshold Boundaries
2:30 - Subtracting by our FollowOffset
3:05 - Drawing Gizmos to outline our threshold box
4:05 - Calculating the distance between our character and the center of the camera
5:35 - Defining the new position for the camera
7:10 - Use Vector3.MoveTowards to move our camera
8:10 - Using RigidBody velocity for camera speed
9:20 - Final Product
COPY & PASTE CODE FROM THIS TUTORIAL:
pressstart.vip/tutorials/2019/11/29/105/mario-2d-camera.html
VIDEO SERIES:
Animation: czcams.com/video/Gqel6Ed4LpY/video.html
Running: czcams.com/video/USLp-4iwNnQ/video.html
Jumping: czcams.com/video/RPdn3r_tqcM/video.html
PERFECT DEVICE ZOOM:
czcams.com/video/3xXlnSetHPM/video.html
MORE TUTORIALS:
pressstart.vip/unity-tutorials
zhlédnutí: 42 116
Video
A Perfect Jump in Unity - A Complete Guide
zhlédnutí 76KPřed 4 lety
In this video we show you how to setup perfect Mario-like jumping in Unity. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:40 - Using a Ground Layer to detect if player is touching the ground 1:23 - Understanding How RayCasts work 2:15 - Applying a Physics2D.Raycast to check for Ground Collision 3:16 - Testing and Tweaking Ground Collision 3:55 - Us...
Super Mario - Running Tutorial in Unity
zhlédnutí 48KPřed 4 lety
In this video to cover running in a 2D environment for Platformer games. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub PART 1 on Character Animation: czcams.com/video/Gqel6Ed4LpY/video.html In this video, we cover: 0:40 - Adding a RigidBody2D and C# Script 1:24 - Defining Controller Input in C# 2:40 - Moving our Character with RigidBody2D.AddForce 3:35 - Adding Animation Sta...
2D Character Animation in Unity [pt 1 of 4]
zhlédnutí 32KPřed 4 lety
I explain how to draw, animate and setup transitions for your 2D character in Unity. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:35 - How to find spritesheets to reference when drawing 1:30 - Using the right art program to use 2:00 - 3 things to know about how to setup your document 3:38 - Using Aseprite to draw my animations 4:11 - Importing my ...
Dust Effect when Running & Jumping in Unity [Particle Effect]
zhlédnutí 145KPřed 5 lety
In this video we re-create the dust trail effect from games like Super Mario World and Celeste SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub COPY & PASTE CODE FROM THIS TUTORIAL: pressstart.vip/tutorials/2019/09/1/101/dust-trail-effect.html MORE TUTORIALS: pressstart.vip/unity-tutorials TIMESTAMPS: 0:30 - Adding Particle System 1:30 - Setting the position and scale of the pa...
Super Mario Maker 2 - How to Recreate the Key Door in Unity
zhlédnutí 11KPřed 5 lety
In this video I show you how to recreate the key follow and key door effects from the game Super Mario Maker 2 SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:25 - Current Scene Setup 1:00 - Setting up the Key Object 1:30 - Installing a Spring Joint 2D component 3:35 - Creating a script for our Key Follow Object 5:00 - Setting up a backpack for our C...
Unity - How To Contain RigidBodies Inside 2D Colliders
zhlédnutí 16KPřed 5 lety
In this video I show you how to hack any 2D collider to allow it to contain objects with RigidBodies. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:00 - Explaining the Problem 1:20 - Theorizing a Solution 2:11 - Testing The Theory 3:45 - The Final Code Used DOWNLOAD THIS RESOURCE: pressstart.vip/resources COPY & PASTE CODE FROM THIS TUTORIAL: press...
Unity - Enemy Follows Player [Beginner Tutorial]
zhlédnutí 185KPřed 5 lety
In this video I show you how to create enemy AI that follows your player around the screen. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:12 - Downloading and importing assets from the asset store 0:30 - Animating and creating our characters 1:10 - Creating a C# script for our Follow Enemy AI script 1:40 - Calculating the direction our player is in...
I MADE A GAME IN 48 HOURS
zhlédnutí 2,8KPřed 5 lety
PLAY FOR FREE: astoldbywaldo.itch.io/death-cruise SUBSCRIBE: bit.ly/2Js78lE Patreon: www.patreon.com/pressstartclub LEARN HOW TO MAKE GAMES LIKE THIS: pressstart.vip/unity-tutorials #unity #scorejam
Death Cruise - Game Jam Trailer
zhlédnutí 1,3KPřed 5 lety
I made this game in 72 hours for #SCOREJAM PLAY IT HERE: astoldbywaldo.itch.io/death-cruise Patreon: www.patreon.com/pressstartclub LEARN HOW TO MAKE GAMES LIKE THIS: pressstart.vip/unity-tutorials
Unity - How to Keep Score
zhlédnutí 36KPřed 5 lety
In this video I am going to show you how to keep track of a players score by showing you how to make a basic game in Unity. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:55 - Adding Colliders and RigidBodies to our objects 1:48 - Downloading resources from PressStart: pressstart.vip/resources 2:15 - Creating a C# script 2:40 - Creating a trigger co...
Unity - Creating a Level Select Screen in C#
zhlédnutí 36KPřed 5 lety
In this video I am going to show you how to create a level manager using only C# code. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:30 - Setting up the scene 0:55 - Creating a Level Button prefab 1:25 - Creating a Placeholder Panel for our Pages 2:02 - Creating a C# script to manage our levels 2:40 - Calculating how many levels fit on a page and h...
Swiping Pages in Unity
zhlédnutí 57KPřed 5 lety
In this video I am going to show you how to swipe between panels. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:45 - Setting up the canvas 1:35 - Creating a new C# script 1:45 - Using Unity's built-in drag event handler 3:00 - Creating a function to move our panel 4:20 - Creating a function to jump between pages 6:35 - Creating an easing effect to ...
2D Perspective Effect with an Orthographic Camera (Parallax)
zhlédnutí 48KPřed 5 lety
In this video I show you how to create a parallax effect with a looping 2D background. SUBSCRIBE: bit.ly/2Js78lE SUPPORT: www.patreon.com/pressstartclub In this video, we cover: 0:25 - Recap of the Background Loop Script 1:40 - Setting up the Z Axis 2:30 - Calculating Parallax Speed 4:25 - Storing our Camera's position 5:15 - Moving our background objects at Parallax Speed 5:25 - Final Product ...
Welcome to Press Start
zhlédnutí 10KPřed 5 lety
Hey, my name is Waldo and I’m a game developer who loves to make videos on game development. I taught myself how to code when I was around 9 years old and I have been doing it almost everyday since. I'm a strong believer that education should be free and that's why I started Press Start and made it publicly accessible for everyone to learn. SUBSCRIBE: bit.ly/2Js78lE
Scrolling Repeating Background in Unity
zhlédnutí 93KPřed 5 lety
Scrolling Repeating Background in Unity
Mobile Joystick Movement + Shoot in Unity
zhlédnutí 36KPřed 5 lety
Mobile Joystick Movement Shoot in Unity
Unity - Shooting Enemies with Projectiles
zhlédnutí 36KPřed 5 lety
Unity - Shooting Enemies with Projectiles
Unity - Multiple Touches on Mobile Device [Input.GetTouch]
zhlédnutí 38KPřed 5 lety
Unity - Multiple Touches on Mobile Device [Input.GetTouch]
Unity - Mobile Panning with a Perspective Camera
zhlédnutí 38KPřed 5 lety
Unity - Mobile Panning with a Perspective Camera
Unity - How to Detect Collision in C# [Using Colliders]
zhlédnutí 252KPřed 5 lety
Unity - How to Detect Collision in C# [Using Colliders]
Unity Movement [RigidBody vs Translate]
zhlédnutí 285KPřed 5 lety
Unity Movement [RigidBody vs Translate]
Spawning Objects in Unity [Using Instantiate]
zhlédnutí 240KPřed 5 lety
Spawning Objects in Unity [Using Instantiate]
Unity - How To Save Game / Data [PlayerPrefs]
zhlédnutí 107KPřed 5 lety
Unity - How To Save Game / Data [PlayerPrefs]
Pinch to Zoom and Panning on Mobile in Unity
zhlédnutí 31KPřed 6 lety
Pinch to Zoom and Panning on Mobile in Unity
Unity: Mobile Joystick Tutorial [NO PLUGINS]
zhlédnutí 24KPřed 6 lety
Unity: Mobile Joystick Tutorial [NO PLUGINS]
Unity - Keeping The Player Within Screen Boundaries
zhlédnutí 143KPřed 6 lety
Unity - Keeping The Player Within Screen Boundaries
Understanding Orthographic Size in Unity
zhlédnutí 85KPřed 6 lety
Understanding Orthographic Size in Unity
i prefer using linear interpolation!
It's so useful when you figure out how to make your own tools, it saves so much time. Like I remember I wanted to make something smoothly Lerp from between 2 Vector 3 points and then back over and over again so then I made a script that gets 2 vector 3 positions or 2 empty objects that I can place where I want for point A and B and also has a changeable speed variable in the inspector and you can choose an object you want to move between these points, I made it by making a float variable, then on update, setting it to equal Time.time, then I divide it by another float variable (this will be the speed), then I Modulate it by 2, like this: movingTime = (time.time / speed) % 2; I think it's that. Then then I do movingTime -- ; to subtract one so now it goes from -1 to 1, then I do movingTime = Mathe.Abs, something like that, I can't remember exactly but basically I set the variable to be the Absolute of itself, then I use the movingTime = Mathf.SmoothStep( 0f, 1f, movingTime); to make it smoothly go from 0 to 1 and back to 0, you can also set it so that on start, it gets the distance between point A and B in a straight line and set it to multiply the returned number of the first line of code to that number so now it always moves at the speed you set it to move at, no matter the distance. You can use it for moving floating platforms and stuff
It's funny how the red circle just slowly moves upwards until popping out of the ugly grey blob at 2:19
4 years later, still great tutorial
Very Helpful. Thank you
Man, you are best!
NA OEH IUGUAL MARIO CARA
i just made a very stupid coding mistake so basicly i made the variabla isgourned false when the player was on the ground
Just don't use translate :D
2 minutes ago, an AI helper tool suggested me this video. Dude...
thanks, rlly helpful.
The movements come out the other way around, I move it to the left and it goes to the right, I move it up and it goes down
The method to convert screen to world coordinates isn’t accurate because it doesn’t work with extreme resolutions like 1080 x 2636
awesome this very helpful and short video
Thank You dear!
THANK YOU
does this work? I've tried several other guides but they explain things very bad so I'm not able to follow it.
Dude what the fuck is this black and white with black bg choice? You fucking jumpscared me holy shit.
F0ck... I made a game with .velocity, and already uploaded it. The thing is I wanted to have physical objects actually pushing the character, but I didn't find your video on time.
what if you want the asteroids to behave with collision on some objects but like a trigger with the player?
thank you, good man
I didnt know that PlayerPrefs is non volatile. I always thought the variables in PlayerPrefs will be deleted when closing the game.
Try this code at:3:47 Quaternion angle = Quaternion.Euler(direction.y, direction.x,0); rb.rotation = angle;
Thank you!
This was such a great tutorial! Thank you so much. I actually made mine in 3D, so I made a few modifications to your script. I'll drop it here in the comments in case anyone wants this result but in 3D :) using System.Collections; using System.Collections.Generic; using UnityEngine; public class multipleTouch : MonoBehaviour { public GameObject circle; public List<touchLocation> touches = new List<touchLocation>(); void Update () { int i = 0; while(i < Input.touchCount){ Touch t = Input.GetTouch(i); if(t.phase == TouchPhase.Began) { Debug.Log("touch began"); touches.Add(new touchLocation(t.fingerId, createCircle(t))); } else if(t.phase == TouchPhase.Ended) { Debug.Log("touch ended"); touchLocation thisTouch = touches.Find(touchLocation => touchLocation.touchId == t.fingerId); Destroy(thisTouch.circle); touches.RemoveAt(touches.IndexOf(thisTouch)); } else if(t.phase == TouchPhase.Moved) { Debug.Log("touch is moving"); touchLocation thisTouch = touches.Find(touchLocation => touchLocation.touchId == t.fingerId); thisTouch.circle.transform.position = getTouchPosition(t.position); } ++i; } } GameObject createCircle(Touch t){ GameObject c = Instantiate(circle) as GameObject; c.name = "Touch" + t.fingerId; c.transform.position = getTouchPosition(t.position); return c; } Vector3 getTouchPosition(Vector2 touchPosition) { return GetComponent<Camera>().ScreenToWorldPoint(new Vector3(touchPosition.x, touchPosition.y, 20f)); } } If you want the circle (or whatever gameobject you have) to be bigger/smaller in the screen, just modify the "20f" in the getTouchPosition method. The other script stays the same though. Hope this helps!
Its very good tutorial but does it works with 3D too?
Why I can use Unity Recorder mysteriously the velocity player is higher than a no record Mode?
Would you be able to explain why you set the grounZ and not groundX or groundY? many thanks in advance
Huge thank you! :) <3
I am using the Adventure Creator plugin and this does not work. I suspect something is overriding it. Any idea how to solve this?
I was very confused why this worked for everyone but me. Guess what... my script was not check marked so it was disabled all the time xD. Great video, i have a phone with a weird resolution so i needed this to be able to play my own game lmao
bro talking like joe pera
You can achieve the same results with one line of code "Material.SetTextureOffset("_MainTex", new Vector2(loopSpeed * Time.time, 0f));"
This and your edge collider hack video really helped solve a problem that had me stuck. Thank you!
Thanks a lot!
where is script?
I do not understand how rigidbodys work at all there is no clear tutorial on simple movement with them
If you're having weird issues with snapping back to the first panel, simply move some code (that sets the panel location variable to the new transform.position) into the while loop of the Coroutine worked for me!
I'm at college so im following along with subtitles. Still such a great tutorial!! Thanks. Also not sure if this was mentioned but remember to unparent your camera to your character.
hi i cant find the levels option in background script like in 3:35 in video can someone guide
Best🎉
one of the best game dev channels I've ever seen sad too see you not currently uploading
Seems like one of my students copied your code here.. But it doesnt work remotely like mario's camera.. And WHY THE HECK are you using Distance functions to calculate x Distance? Wow.. And rigidbody? (facepalm)
Mario moves a bit trickier. But thank you for the idea. :)
Bro where should i place the Creat dust (); because i dont have change direction command in 2d 😢😢 pls tell fast
you, sir, are the BOSS! ty so much!!!!
I swear to god I threw your code on the camera and another camera follow code and another parallax code that doesn't repeat the backgrounds and all the sudden I have the smoothest Parallax I've ever done in my life. Thank you for the amazing video. Time to analyse that long ass code to understand wtf is going on :D
Still valid today
Very brilliant and clearly explained! You saved me at least 2 days.
Dude, this video saved me a lot of time, thank u <3