Sign in to follow this  

Idiot (Me) can't figure out collisions

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this