Timeline for Use one collider for Rigidbody2D.Cast, and another for a hurtbox
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 30, 2022 at 19:26 | answer | added | Gerrit Begher | timeline score: 2 | |
Sep 30, 2022 at 19:02 | comment | added | DMGregory♦ |
I'm not aware of a rigidbody-level solution offhand. I'd recommend posting an answer showing a solution with Collider2D.Cast for now, and see if any other suggestions arise.
|
|
Sep 30, 2022 at 18:56 | comment | added | Gerrit Begher |
Lovely! This should solve it. I did not know that the colliders themselves also have the Cast method. (But out of curiosity: Is it possible to solve it at the level of the Rigidbody? The use case would be: The intended collision shape is a composite of several colliders, the intended hitbox is a composite of other colliders. Of course I could then do a foreach and cast all the hitbox colliders but it'd be great for my understanding if there's a top-level solution).
|
|
Sep 30, 2022 at 18:46 | comment | added | DMGregory♦ |
Have you considered using footCollider.Cast() instead of rigidbody.Cast() ?
|
|
Sep 30, 2022 at 18:44 | history | edited | DMGregory♦ | CC BY-SA 4.0 |
Clarifying title
|
S Sep 30, 2022 at 17:54 | review | First questions | |||
Oct 4, 2022 at 12:35 | |||||
S Sep 30, 2022 at 17:54 | history | asked | Gerrit Begher | CC BY-SA 4.0 |