C
C#5w ago
Axivex

Trigger isnt working

I can have the 2 box colliders overlapping and it still isnt triggering
No description
No description
No description
18 Replies
Angius
Angius5w ago
onTriggerEnter and OnTriggerEnter are not the same C# is case-sensitive
Axivex
AxivexOP5w ago
The tutorial I was using used onTriggerEnter though it is a couple years old Ill try with capital O yep that worked ig it got changed in some update
Buddy
Buddy5w ago
Please use CompareTag and stop following tutorials 1:1 Tutorials suck
Buddy
Buddy5w ago
This is also legacy and USELESS
No description
Buddy
Buddy5w ago
It's literally just a wrapper to Debug.Log(..) -- Which is a static method (globally accessible without being tied to an instance)
Axivex
AxivexOP5w ago
That was just to check if the collision wasnt working or some other part of the code wasnt working seems fine for now cause the guy is actually explaining what and how and why everything works
Buddy
Buddy5w ago
Careful, don't get stuck in tutorial-hell where you can only make games by watching a tutorial
Axivex
AxivexOP5w ago
yea after I complete this I plan on trying to make simple games like connect 4 n stuff without tutorials then move on to more complicated stuff also one more thing I need help with when im next to a wall and holding a direction I dont fall? how do I fix that Gravity is still the same as always
Buddy
Buddy5w ago
Either use a physics material or use the dot product and check if the collided object is a wall or a roof
Buddy
Buddy5w ago
pannenkoek2012
YouTube
SM64’s Invisible Walls Explained Once and for All
I explain Super Mario 64’s invisible walls once and for all. This video took 10 months to make! So if you want to support me and my efforts like this one, please consider becoming a member of my channel: https://www.youtube.com/@pannenkoek2012/join Thanks to the following people: ➤ MasterKush, for providing a tool that helped with the visuals ➤...
Axivex
AxivexOP5w ago
w-
Axivex
AxivexOP5w ago
I mean like I wont fall here unless I stop holding left
No description
Buddy
Buddy5w ago
Yes, I know the issue You're setting the velocity right? As I said, the only decent way to fix is what I mentioned above. I'd use the latter fix because that also fixes roof jumping issues
Axivex
AxivexOP5w ago
ok but the problem is I have no idea what any of this means like I said im very new to unity
Buddy
Buddy5w ago
Then look physics material up or/and use the video I linked
Axivex
AxivexOP5w ago
and C# ok
Buddy
Buddy5w ago
and dot product isn't anything Unity, but math https://www.falstad.com/dotproduct/ if you want to visualize the dot product
Buddy
Buddy5w ago
3Blue1Brown
YouTube
Dot products and duality | Chapter 9, Essence of linear algebra
Why the formula for dot products matches their geometric intuition. Help fund future projects: https://www.patreon.com/3blue1brown An equally valuable form of support is to simply share some of the videos. Home page: https://www.3blue1brown.com/ Dot products are a nice geometric tool for understanding projection. But now that we know about lin...
Want results from more Discord servers?
Add your server