Pushing the Character

I’ve seen many, many, many threads about how to get the Character to push a rigidbody etc etc. I havn’t seen any threads that explain how to get that same rigid body to just push the character.

What I’m attempting to do in the code I’m working on is to make it so that a Block will push the character. Basically the Block snaps to a block below it. But if the player is in the way the Block that is supposed to snap will just get nudged over instead of the player. I want the player to be pushed away by the Block, not the other way around.

Any helpful advice, suggestions, or questions about what it is I’m trying to do are warmly welcomed. I got nothing. I’ve tried a few different things but no luck and im just stuck again.

I believe, and I could be wrong on this, the problem is that the Character controller is Kinematic and thus won’t respond to outside forces unless you tell it to through scripting.

Your blocks will deflect off of it because it has a collider but, for all intents and purposes to the block’s collider, it’s seen as an immoveable object.

I think you’ll have to add in some collision code for your controller to say

OnCollisionEnter(col: Collision){
    //push me with the appropriate force
}

edit


Upon another search through the answers, it looks like you have to have a rigidbody attached for physics (don’t know why I didn’t realize that the first time…)