So, I have some rigidbody enemies. They use a rigidbody.MovePosition to move.
The problem is this, when the character runs into the players, the velocity from the character is transferred to the enemy (think newton’s cradle). I don’t want this. Is there a way to ignore physics from the player? I don’t want to be able to walk through the enemies. I want them to solid when I hit them, and stand their ground.
Does that make sense?
EDIT:
So the problem has changed a little bit after a lot of digging! It has something to do with my scripts (links found in comments). I use a Move function to move the enemy, and I put a velocityX variable into the move to move my enemy. When I set velocityX to 0 and the enemy is still, then the enemy doesn’t get pushed around, but when the enemy is moving, the enemy gets pushed around. I need ideas!
EDIT 2:
I changed to a AddForce function, but it still hasn’t helped! I made a video of the problem to try and better explain it: Link to Video!
EDIT 3:
I’m back again… I totally rewrote the script. I took everything to the dry erase board and wrote it all out before I typed it up. The pushing problem still persists though. I can’t figure out what’s going wrong!!! Any ideas? (If you want, my skype is cg.artist4jc. If you contact request me, please put “Unity” in the contact request message.)
|-------------- LINK TO SCRIPT --------------|