Trigger isnt working
I can have the 2 box colliders overlapping and it still isnt triggering
18 Replies
onTriggerEnter
and OnTriggerEnter
are not the same
C# is case-sensitiveThe 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
Please use CompareTag
and stop following tutorials 1:1
Tutorials suck
This is also legacy and USELESS
It's literally just a wrapper to Debug.Log(..) -- Which is a static method (globally accessible without being tied to an instance)
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
Careful, don't get stuck in tutorial-hell where you can only make games by watching a tutorial
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
Either use a physics material or use the dot product and check if the collided object is a wall or a roof
https://youtu.be/YsXCVsDFiXA?si=JB9akF6k2rIFez9d&t=398
Refer to this
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
➤...
w-
I mean like I wont fall here unless I stop holding left
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
ok but the problem is I have no idea what any of this means
like I said im very new to unity
Then look physics material up or/and use the video I linked
and C#
ok
and dot product isn't anything Unity, but math
https://www.falstad.com/dotproduct/
if you want to visualize the dot product
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...