Streak Club is a place for hosting and participating in creative streaks.
i didn't really want to spend the one layer i get on the player GameObject by setting it to IgnoreRaycast, but it makes a fair bit of sense and, after a little tinkering, i got Physics.SphereCastNonAlloc to work the way i expected it to. i'm not exactly sure what i was doing wrong last night, but eventually the way i had things set up made sense again and it worked.
the second image shows the cast of the sphere from the center of the player into the ground. the gif doesn't show this, but the player still has an awkward time walking on slopes (and sliding due to gravity). this ground check, while being very useful for jumping, will simultaneously solve all of these lateral movement problems. now my sphere cast can get the average normal of the surface the player is standing on, which is a very helpful vector for walking, sliding, slipping, etc.
joined 1,784 days ago
Post a comment