i am trying to create an airhockey game and when the player hits the ball,the ball push him (both the ball and the player move on the collision)how can i make the player to not respond to the ball force?
(both of them are rigidbody)plz help
how does it move the player? Does the player control the mallet with the mouse? Try removing the rigid body from the mallet and see what that does. You could have the mallet stick to the curser using raycasting.
The player moves with the arrow keys and it doesnt work when i remove the rigidbody from the ball,i need that the player wont relate to the ball force,by the way how can i control the player(rigidbody)with the mouse,i tried a several ways but none of them worked
please help
can someone help me please?
You can’t have your cake and eat it too.
If your player object is to affect things through physics, then he too will be affected by physics.
However, you could try to save his physics attributes at the time of the collision, and then set tham back to those values when the collisions is over. Fairly tricky I suspect, and generally not recommended as far as I’m aware.
As for character controller, have you checked these scripts out?
Making the relative rigidbody masses significantly different may help (while sticking to general mass guidelines of course).
If you leave the player mass at 1 and change the ball to .01 the player should push the ball without being affected much.