Closed Seanmclem closed 7 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
character-control | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 28, 2023 1:32am |
Thanks for your contribution @Seanmclem ! However, the default ecctrl collider is just one capsule, and it only triggers enter event once I believe. For specific models or collider use cases, users can name their own colliders to indicate the desired event.
Thanks for your contribution @Seanmclem ! However, the default ecctrl collider is just one capsule, and it only triggers enter event once I believe. For specific models or collider use cases, users can name their own colliders to indicate the desired event.
Right, but the included capsule collider of the library should be able to identify itself. Instead of me, only being able to identify additional colliders added through models. Because, in that case, the included capsule collider would always be nameless.
I only included the updated name of the separate model as an example. I can remove it if that makes it more clear.
Emm.. make sense. So you need a way to only identify the ecctrl collider, right? If you could only include name for the capsule collider, I will proceed with merging it into the main 👍
@ErdongChen-Andrew ok done
I was recently using a cuboidCollider with
onIntersectionEnter
and exit. I found the character to trigger the event more than once on each enter/exit. Because it has colliders on the model, and on the Ecctrl component itself. By adding aname
property to each one, especially the Ecctrl one, we can now detect or differentiate exactly which one caused the event to fire. So if we want to detect a single event, we can exclude those that don't have thecharacter-body-capsule-collider
name, for example.These names would show up in
onIntersectionEnter
>event.colliderObject.name