Unity Beginner Tutorial : Triggers

  Рет қаралды 77,668

Jayanam

Jayanam

6 жыл бұрын

This is a beginners video tutorial for Unity in which I explain what colliders and triggers are and how to use them.
I demonstrate the use of triggers and C# by using a simple example for a third person character.
I am using Unity 2018 but you can use older version like Unity 2017 or Unity 5 as well.
See my social profiles here
G+: plus.google.com/+JayAnAm
Twitter: / jayanamgames
Facebook: / jayanamgames
Patreon: / jayanam
Indiegogo: / jayanamgames
Production Music courtesy of Epidemic Sound: www.epidemicsound.com

Пікірлер: 55
@ZatiCoh
@ZatiCoh 4 жыл бұрын
wow, I watched this video 12 separate times confused why it wasn't registering... Finally heard you say the rigid body part and it worked perfectly
@JayAnAm
@JayAnAm 4 жыл бұрын
Alright, great you found it.
@Blake-Lawton-Dev
@Blake-Lawton-Dev 4 жыл бұрын
@@JayAnAm It might be worth adding a annotation to this video saying that at least one of the objects with a collider needs a rigid body. I had the same problem as ZatiCoh and had to do a little bit of research to find out why my triggers were not working. Great video with strong explanation and good example though!
@AlPootis
@AlPootis 4 жыл бұрын
@@Blake-Lawton-Dev I thought annotations were removed.
@Blake-Lawton-Dev
@Blake-Lawton-Dev 4 жыл бұрын
@@AlPootis yeah I just mean maybe just a quick edit to the video adding in some text about it or something in the description.
@koseki_stuff
@koseki_stuff 3 жыл бұрын
SAME
@koseki_stuff
@koseki_stuff 3 жыл бұрын
Thank u so much!!! I wanted a pressure plate that when stepped on would load a scene. This video helped me understand triggers and i made code that when the player would step in the trigger zone it would load the next scene.
@micaiahstevens8840
@micaiahstevens8840 6 жыл бұрын
Great job; another gotcha is the OnTrigger is called only on the object level, so if your script is one parent above the collider, it won't get called, or below really. For tutorials you added it to the Collider object, which is great, but sometimes you have nesting involved and something to keep in mind.
@JayAnAm
@JayAnAm 6 жыл бұрын
That's true, thx for the additions
@mikethegamedev
@mikethegamedev 4 жыл бұрын
Your tutorials are amazing!
@JayAnAm
@JayAnAm 4 жыл бұрын
Thank you!
@JayTailor45
@JayTailor45 6 жыл бұрын
Just cleared one little concept
@JayAnAm
@JayAnAm 6 жыл бұрын
ok, great
@Koujujutsu
@Koujujutsu 5 жыл бұрын
The music and your voice were so soothing that I fell right a sleep. xD Sorry. Woke up this morning and gave it another try. Thanks for making this video. All the best!
@SunnyThePerson
@SunnyThePerson 3 жыл бұрын
thx this really helps
@McMistrzYT
@McMistrzYT 4 жыл бұрын
Thanks bro!
@sreejithkakkat
@sreejithkakkat 3 жыл бұрын
Clear and simple tutorial. I have a doubt , what if i need to change the color of the character instead of that cube?
@GuyWithChainsaw
@GuyWithChainsaw 2 жыл бұрын
Great tutorial. Simple and to the point! I have a small question. Let's say I want only the player to activate the trigger. How should I go about it? Something with Tags? Thank you
@sqrddouble6003
@sqrddouble6003 4 жыл бұрын
I was wondering if you could make it’s so that the player changes colour instead of the platform despite the platform being the trigger and the player being the collider.
@everythingcool491
@everythingcool491 4 жыл бұрын
Hi, thx for the really great tutorial, I have a question, works perfect with my OVRplayer but when i throw a rigidbody grabbable cube onto it, it will trigger but not revert to old color on exit?
@apurwagokhale5486
@apurwagokhale5486 3 жыл бұрын
facing the same problem, did you resolve this?
@moscowsheets3784
@moscowsheets3784 4 жыл бұрын
NullReferenceException: Object reference not set to an instance of an object EndTrigger.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Scripts/EndTrigger.cs:10) help pls
@kingdom216
@kingdom216 3 жыл бұрын
Do you have a script for goal triggers and boundary triggers to set a gameobject to a specific spot like a face off circle?
@oilbaggcomedy1058
@oilbaggcomedy1058 3 жыл бұрын
Hi can you help me on how to make a platform fall once I jump I on it
@MaddoxSt33
@MaddoxSt33 6 жыл бұрын
Nice going bro i would really love to see the melee combat script for a player What i mean is that when a player's certain animation lets say melee attack is performed and hits the enemy it damages the enemy and then dereases the enemys health(enemy and player both have health bar) and enemy can do so i am having trouble doing this kind of stuff and cant find a nice one online. Can you do it?
@JayAnAm
@JayAnAm 6 жыл бұрын
This will be a part of the Low POly Game kit I am developing, but will take some time till I am at this point. You can checkout my Unity UFPS videos, were I implemented a logic that is a bit similar to this.
@MaddoxSt33
@MaddoxSt33 6 жыл бұрын
yeah bro i will surely check that out :) nice work going bro
@codingidiot6754
@codingidiot6754 2 жыл бұрын
lets say i have 1 game object with 2 triggers, and then something collides with one of that object's triggers how could i tell apart which trigger got collided with?
@ahmedlive
@ahmedlive 4 жыл бұрын
Do you know how to make it so it doesn't activate the trigger with parts like the floor? like if the floor has a collider, how do I make it so it can ignore only the floor?
@JayAnAm
@JayAnAm 4 жыл бұрын
You can check the layer based collision detection : docs.unity3d.com/Manual/LayerBasedCollision.html - or you just check in the OnTriggerEnter the Collider parameter and react if it is of a certain type (like has a special name of has a certain componant attached) only.
@watercat1248
@watercat1248 4 жыл бұрын
Because i wont to mack pick up System 1.ther is way to use public trigger box in player instead the scripts inside from each trigger box?
@watercat1248
@watercat1248 4 жыл бұрын
never mine I thought finger out haw to do that I will put i triger box inside the player and i rigidbody from each the weapon also I will put spefic rigidbody objects in ther odder to work properly
@mdjred2709
@mdjred2709 6 жыл бұрын
Could you make a menu tutorial?
@JayAnAm
@JayAnAm 6 жыл бұрын
Ok, thx for the input, will put this to my list
@JongHyunSM
@JongHyunSM 4 жыл бұрын
how to change Player Collider Position if we want the collider trigger in front of the player?
@ashiinsane90
@ashiinsane90 3 жыл бұрын
Same question here, found any solution?
@bowblend1396
@bowblend1396 6 жыл бұрын
Could you make godot c# tutorials?
@JayAnAm
@JayAnAm 6 жыл бұрын
Well I made this one : kzfaq.info/get/bejne/rrd9daaF27zTkWw.html
@bowblend1396
@bowblend1396 6 жыл бұрын
Good, but can you make tutorial for some character controllers or bots in godot c#?
@patitocastro5779
@patitocastro5779 5 жыл бұрын
i want to active a gameobject with a simple trigger but i cant, can somebody help me?
@JayAnAm
@JayAnAm 5 жыл бұрын
When you write "but I cant", what's the reason for this:-) Please describe a bit more in detail so that we can help you with this.
@CanaldoKhal
@CanaldoKhal 3 жыл бұрын
Oh! tnx, dammit rigid body haha xD
@TheConceptGuy
@TheConceptGuy 3 жыл бұрын
How to use this for character controller ?
@codingidiot6754
@codingidiot6754 2 жыл бұрын
character controllers cant use this im pretty sure
@komodooficial8098
@komodooficial8098 3 жыл бұрын
British? Nice Video ♥
@bortuda
@bortuda 6 жыл бұрын
doent it work easy without script`? like in unreal4
@CentboyMidnight
@CentboyMidnight 6 жыл бұрын
#exgirlfriend machine import random she = input("write her name: ") sheForgotYou = True petals=3 def sheNeverLovedYou(herName): loveRate = random.random() if loveRate
@McMistrzYT
@McMistrzYT 4 жыл бұрын
xD
@MrNerd-ll9my
@MrNerd-ll9my 4 жыл бұрын
my man wrote a simp detector
@ryana.9821
@ryana.9821 4 жыл бұрын
Not really helpful. Was interesting, but just cut and pasted code.
@JayAnAm
@JayAnAm 4 жыл бұрын
Not helpful for what, what did you expect and what is missing?
@ryana.9821
@ryana.9821 4 жыл бұрын
@@JayAnAm I guess that was an unfair comment, I would have liked to have seen more functionality. Say, gameObject walks on box, a door opens. Guess thats not really beginner concepts though.
@JayAnAm
@JayAnAm 4 жыл бұрын
@@ryana.9821 Yes, but good topic for another video
Unity Navmesh Tutorial : Obstacles
2:09
Jayanam
Рет қаралды 9 М.
Why I’m switching from Unity to Unreal Engine
9:02
LixianTV
Рет қаралды 1 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 46 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 16 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 39 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
Game Development for Noobs | Beginner Guide
12:01
Flow Studio
Рет қаралды 857 М.
Colliders as Triggers in Unity - Unity3D Fundamentals
5:36
Deniz Simsek
Рет қаралды 9 М.
MAKING YOUR FIRST LEVEL in Unity with ProBuilder!
16:38
Brackeys
Рет қаралды 940 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
COLLIDERS y TRIGGERS en UNITY
9:31
Kostas
Рет қаралды 32 М.
ULTIMATE Event System for Unity Beginners
8:27
This is GameDev
Рет қаралды 45 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 765 М.
Trigger Zones - Unity Quick Tip
3:15
passivestar
Рет қаралды 17 М.
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 46 МЛН