Hello, I’m writing a 2d platformer and I have a couple of questions about rigidbodies and collisions.
My floors have a rigidbody (with no gravity effect on them). My main character also has a rigidbody so that he can walk on the platform. This obviously works with no issues, but my bad guy (so far he just stands there) also has a ridigbody.
When my character fires a bullet (which also has a rigidbody). The bullet can hit the bad guy fine and the collisions gets called and from there I can remove the bad guy. The problem is if my character makes contact with the bad guy, say walking into him, there both get effected by the physics system and collide with each other.
Should my badguy not have a rigidbody? Is there a better way to handle this? Should my main character have a rigidbody? I added a rigidbody because I need the ability to walk up steps and slopes.
How would you guys do this? Are there any patterns to follow?