I’ve got a bit of a predicament. My characters are stepping up on top of characters when, to my knowledge, they shouldn’t be. (They’ve got a step offset value of 0.) It’s becoming a little annoying since I can’t prevent it them from stepping up on top of things without disabling their collisions in the physics matrix, but doing that means that they can phase freely into one another.
The first clip is with collision enabled between the character controller’s layer (the attacker), and the body parts of the large wolf. You see early on that the human just kind of pops on top of it when the wolf is attacking, which causes it to miss its attacks.
closepotableichneumonfly
This second clip is with collisions off which, unsurprisingly, also causes the wolf to miss 90% of its attacks.
ficklephonyassassinbug
Has anyone found a way to get around this, or to specify only some layers that character controllers can step onto?
Thanks muchly.
The step offset at 0 might be what is causing this. Try setting to 0.1, as 0 is probably messing with the calculation causing it to step up everything.
It might also have to do with the animations causing it to “phase” into the other collider which then tries to correct the collision pushing it out seeming like its “stepping on” the wolf.
Unfortunately, that didn’t work. The step offset used to be 0.3 to allow for characters to easily traverse the terrain and what-not, but I just tried it and I get the same result. The Unity documentation on the ‘Step Offset’ value reads as such:
That’s why I had hoped zero would work.
How are the animations working? Its the only other thing I can see causing the problem other than a bug.
None of them are root motion, they have some IK on their limbs to ground them properly but aside from that it’s just a standard animation controller. The actual movement is handled by a separate datatype with animation curves to control how they move throughout the attack. This movement is still done by calling the CharacterController.Move() function.
Hmm, not sure how to fix this. If anything it should push the player out of the way and not put them on top.
You can try disabling collisions during attack movements, allow it to “phase” only during attacks. It should be pushing or stopping not popping on top.
Might need to submit a bug report with a repro project if you can. For now its finding a work around. I don’t use the CharacterController much, I usually work in 2D as I have an artist available that. I also use rigidbodies for movement in both 3D and 2D.
Yea, that’s exactly it. It should just push them away. I think I’ll try that, making the limb colliders inactive while the actual attack hitboxes are active, thanks.
Thanks for the help, regardless - I appreciate it.
1 Like
Sorry for resurecting this post, but I’m coming across the same issue.
Basically when touching an entity with a character controller the entity will try to climb on top of the player. This can be somehow mitigated by playing with the step offset but that will affect the entities when navigating.
Isn’t here an option for the character controller to just not try to climb up when approached by another character controller or ribidbody entity?