- Home /
how can you let a ball bounce in a 2d topdown tank shooter??!!!
i have been trying to let balls/bullets bounce inside my maze which is filled with tanks as which you can play. but i can now only shoot straight and the bullets dont bounce on the walls and i have no idea how to do this. I have been trying this for 6 hours spread to 2 days and its killing me pls help.
(extra explanation) so i have a tank which can rotate and move with wasd keys and with m it shoots a bullet which is a prefab and spawns out of a place inside the barrel and then it takes the position and rotation of that transform and moves forward. but i now want it to bounce onto wall but i cant get it pls help.
Answer by oldark · May 29, 2019 at 06:55 PM
If it's an option for you try setting your bullets to have dynamic rigid bodies and adjust the friction for collisions down so they don't lose momentum. From there Unity's physics should handler the bouncing as long as there are colliders on your walls. You can set gravity to 0 in the Physics2D section of project settings to ensure they don't drop.
Your answer
Follow this Question
Related Questions
My object acts wierd, 2 balls being shot instead of one (from different position) 2 Answers
Gun Script 1 Answer
Bounce into the air 1 Answer
Prefabs & scripts 1 Answer
Need Help with Shooting Script c# 5 Answers