Bullet Richochet
Hi Everyone,
I am a middle school teacher and we are really enjoying Gamesalad in the classroom and are excited about the Gamesalad Academy. Brilliant idea.
**My question....
We are creating a tank game and wanted to find out how to make the bullets ricochet off of the walls, kind of like the old Atari game. We have a timer on the bullet, so it can only last so long - 2 secs before destroying itself, but would love to have the ability if the player shoots, it can shoot off an obstacle/wall and ricochet to hit the enemy around the corner, or behind an obstacle. I have a game sample of what has been generically created that can be emailed but cannot find an upload option for the discussion board. We are using the PC version.
Our Bullet/Shot Physics are:
Bounciness: 1 (and have tried multiple variations)
Fixed Rotation: (have tried on and off)
Collision Shape: Circle (have tried both circle and rectangle)
Just a little help would be awesome!!
Thanks to everyone!
Comments
It's easier to help if you give a little more information.
What is currently happening when the bullet hits a wall? Does it bounce at all or stop completely?
What kind of movement rules does the bullet have?
A "collide" behavior on the bullet should be enough to do what you want.
Mental Donkey Games
Website - Facebook - Twitter
You need some walls/obstacles for the bullet to bounce off, make this was actor immovable (uncheck 'movable' in the actor's physics attributes).
In the bullet actor place a collide behaviour and set it to collide with the walls/obstacle actor.
That's basically it, you can then adjust the various parameters like bounciness and friction to suit your needs, but remember to adjust them for both the walls/obstacle actor and the bullet actor.