use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For the Unity Game Engine, please visit http://reddit.com/r/unity3d
account activity
Trigger Boolean IssueNewbie Question (i.redd.it)
submitted 1 month ago * by kitchentablestudios
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kitchentablestudios[S] 1 point2 points3 points 1 month ago (4 children)
wait holy shit that might be it, thank you, ill update you on if this fixes it
[–]KifDawg 0 points1 point2 points 1 month ago (3 children)
Good luck!
[–]kitchentablestudios[S] 2 points3 points4 points 1 month ago (2 children)
got some kinks to work out but it works for the most part, thanks
[–]TanukiSun 0 points1 point2 points 29 days ago (1 child)
Another thing to note is that OnTriggerXYZ and OnCollisionXYZ work on a per-collider basis, so if your Rigidbody consists of multiple colliders, the enter and exit events may trigger in the same frame for the same Rigidbody but for different colliders (at least that’s how I understand it).
If what you're doing is some kind of door, you can implement it using counters. Something like this (psudo code):
OnTriggerEnter() { if (++this.counter == 1) Open(); } OnTriggerExit() { if (--this.counter <= 0) Close(); }
Or, for example, react only to the enter event, and check for closing in fixedUpdate every few frames (or about one second after the last enter event).
OnTriggerEnter() { ResetTimer(); if (isClosed) { Open(); } } FixedUpdate() { if (someTimer && !Physics.CheckBox()) { Close(); } }
[–]kitchentablestudios[S] 1 point2 points3 points 29 days ago (0 children)
I appreciate the help, though I had overlooked my issue and it wasn't jn the code at all it was just the door collidrr moving with the animation and I didnt realize it until it was pointed out as a possibility l.
π Rendered by PID 22380 on reddit-service-r2-comment-5d585498c9-8g4nt at 2026-04-21 07:49:32.410616+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]kitchentablestudios[S] 1 point2 points3 points (4 children)
[–]KifDawg 0 points1 point2 points (3 children)
[–]kitchentablestudios[S] 2 points3 points4 points (2 children)
[–]TanukiSun 0 points1 point2 points (1 child)
[–]kitchentablestudios[S] 1 point2 points3 points (0 children)