- Home /
How do make a projectile that pushes its target when it hits?
I'm making a project on which there are large cannonballs that should push away the character and make it fall from a platform when hit. I made a character controller manually, via code (its not the Unity standard). However, when the cannonballs hits the character, the balls are sent flying away, no matter that both the character and the balls have rigid bodies, and that the balls have a mass of over 8000.
What's the mass of your character's rigidbody?
Your character was made by a collider + your own script?
Unity default character controllers are unaffected by physics, all they can do is collide with things.
Answer by almo · Jun 06, 2011 at 01:39 PM
In the projectile object, when the collision happens, you can get a reference to the thing it hit. Apply a force or move the thing that was hit through this reference.
Answer by RetepTrun · Jun 06, 2011 at 02:09 PM
I as soon as cannonball hits the man(or the instant before) I would turn off my character controller and switch to a rigidbody, then Once the rigidbody was moving slowly turn it off and go to char controller
Your answer
Follow this Question
Related Questions
How can i make a projectile attack travel through multiple enemies dealing damage to all of them? 1 Answer
How to Check Collision When Pushing / Pulling Object in 3D Space 0 Answers
Issues with 2d Player controller(Kinematic) 0 Answers
Filter Collision by tag not working 0 Answers
How to move objects so that they bounce when something hits them? 1 Answer