Hi to all.
I need some pointers on setting up collision between irregular shaped land png image and a boat. This is a 2d game.
Islands I want the ship to get stuck in the shallow water if it gets to close to land and be able to back out if it hit land at slower speed at reverse angle and ship rotation it got stuck at. Faster speeds the ship would take damage and or get pernamently stuck.
On Icebergs it will take damage points the faster it hits and bounce off the Iceberg.
I have tried to just reverse the velocity by multipling by
- 1. If I hit an irregular piece of the land it like sucks the ship farther into the land and destroys it very fast. I have converted values to integers for draw image and images collide command.
I was thinking of keeping track of a series of x,y coordnates, velocity and ship rotation angle to back it out the way it came in. I'm sure there are better ideas
Please help.
Thanks
I need some pointers on setting up collision between irregular shaped land png image and a boat. This is a 2d game.
Islands I want the ship to get stuck in the shallow water if it gets to close to land and be able to back out if it hit land at slower speed at reverse angle and ship rotation it got stuck at. Faster speeds the ship would take damage and or get pernamently stuck.
On Icebergs it will take damage points the faster it hits and bounce off the Iceberg.
I have tried to just reverse the velocity by multipling by
- 1. If I hit an irregular piece of the land it like sucks the ship farther into the land and destroys it very fast. I have converted values to integers for draw image and images collide command.
I was thinking of keeping track of a series of x,y coordnates, velocity and ship rotation angle to back it out the way it came in. I'm sure there are better ideas
Please help.
Thanks