So I have a basic jump/fall setup using 3 States. All the objects the player can land on have a "Ground" tag. The 3 States are:
"Waiting" State- "Get Button Down" for jumping. Transitions to "Jump" state when pressed.
- "Collision Event" > On Collision Exit with Ground as the Collider Tag. Transitions to "In Air" state when the player starts to fall.
"Jump" State- "Set Velocity" on the Y axis. Transitions to "In Air" state.
"In Air" State- "Collision Event" > On Collision Enter with Ground as the Collider Tag. Upon collision with the "ground" tag, transitions to the "Waiting" state.
So the ideal is when my players capsule collider leaves a "ground" id tagged object, the character is falling. It works except when there is a slope. I'm using a cube with a box collider, scaled as a ramp, and then angled. It seems that the angle causes the "In Air" State to activate when I transition from a horizontal plane to the slope. I don't think the angled collider plays nice with the capsule collider.
Any thoughts on how to fix this or use another solution?
Thanks.