# Idiot (Me) can't figure out collisions

This topic is 3658 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm new here. I have a collision problem I haven't been able to figure out. First off all, I'm using a open-source program called Construct, it's kind of like Game Maker. So it's not a language. My game is a top-down spaceship game, and I have the movement laid out: Each ship has these variables: Mass (is set at 300) MovSpeed = How much push the engines are giving XPos = X Position YPos = Y Position XMov = The movement from the engines along the X plane YMov = The movement from the engines along the Y plane XMovEx = The movement from external forces along the X plane YMovEx = The movement from external forces along the Y plane The ship moves by this: SET Ship.Value('XMov') to Ship.Value('XMov')+((Cos(Ship.Angle)*Ship.Value('MovSpeed')/Ship.Value('Mass'))*TimeDelta) SET Ship.Value('YMov') to Ship.Value('YMov')+((sin(Ship.Angle)*Ship.Value('MovSpeed')/Ship.Value('Mass'))*TimeDelta) then SET Ship.Value('XPos') to Ship.Value('XPos')+(Ship.Value('XMov')*TimeDelta)+(Ship.Value('XMovEx')*TimeDelta) SET Ship.Value('YPos') to Ship.Value('YPos')+(Ship.Value('YMov')*TimeDelta)+(Ship.Value('YMovEx')*TimeDelta) Now all this works fine. I just can't for the life of me fingure out how to make the ship bounce when it collides with an opposing ship. I hope I'm not rambling. Can anybody help me? If you can, please be easy on me. YetAnotherSuperhero

##### Share on other sites

http://en.wikipedia.org/wiki/Inelastic_collision

http://en.wikipedia.org/wiki/Elastic_collision

http://en.wikipedia.org/wiki/Coefficient_of_restitution

1. 1
2. 2
3. 3
Rutin
23
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633654
• Total Posts
3013168
×