#Physics updates
1 messages ยท Page 1 of 1 (latest)
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Let me try it out before I try to argue haha, but I thiiiink the first one would flip the bool before the second one gets called, no? If the bool gets flipped after, the trigger would still interact with all 5 colliders.
One message removed from a suspended account.
One message removed from a suspended account.
Hold on I'll make a little video so it's a little less abstract
Okay so first of all here is the original problem I'm trying to avoid. The bombs should do 200 Damage to any object, you can see the HP on the right. Since the bench has 3 colliders, it does triple the damage
however
This scenario should still work (just not do triple damage)
There's some attacks that spawn two hitboxes from the same script too (like a weak part and a strong part)
Buuut yeah lemme try your idea first because if it just works I don't need to explain any further haha
Okay yeah works as a thought. It does 200 damage, but ignores silmultanious triggers. This is already an improvement though, as this is way more of an edge case than the previous one. So thank you already! (: โค๏ธ Let's see if it's possible to fix that second thing too though
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
There's some that do, I have a laser for example.
Only concern here would be that it's a little resource intensive for those ๐ค basically making a new list every frame for every GameObject in a hitbox
One message removed from a suspended account.
One message removed from a suspended account.
Also List by itself doesn't exist ๐๏ธ๐๐๏ธ
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
(knock knock knock)
Man: Hello?
Patrick: I love you
(Harp plays)
(DOOR SLAM!)
Copyright(c) Nickelodeon 2004
One message removed from a suspended account.
One message removed from a suspended account.
I think everything working as intended, there is a little spike when I use hitboxes every frame, but i commented out your part and it's still there so it's just my shit code that I'll work on myself ๐
What? No... use hasTouched.Clear() to remove all entries from the list.
To save a few code operations and easen the garbage collection
This is completely wrong. When you "reset" theList<GameObject>by instantiating it again every frame you create more garbage and requires more operations to be executed. Just instantiate aListin the class and callhasTouched.Clear()when necessary.