Hey guys, having trouble with Raycasting. On my custom (non-physics) character controller I use trigger colliders to stick to the floor. I had a trigger box collider and kinematic Rigidbody on each floor collider, but I’ve been going through and cleaning up old code/objects (now that I’m older and wiser :)) and saw I didn’t actually need the RB for the trigger collider. (At least, that’s my current understanding.) So I removed the RB from my floor colliders. Now, my character falls through the floor. After realizing I needed to specify to the Raycast to hit triggers, I changed to the call which specifies trigger interaction and my new Raycast call looks like this:
bool wasCollision = Physics.Raycast(transform.position, (-transform.up) + desiredMove, out downhitInfo, 20f, int.MaxValue, QueryTriggerInteraction.Collide);
I’m still not hitting my trigger colliders, and if I put a kinematic RB on them, I do. What’s up?
An example of my floor collider:
