Archived

This topic is now archived and is closed to further replies.

after collision detection?

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

Recommended Posts

i just want to hear some ideas that have worked in the past for you all. after you find out that two entities collide, what did you do? im currently making the physics for my game, and i think hearing things that have already worked might spark some good ideas for me. doesnt really matter what game it was, simple or complex, im just curious about how you handled the physics involved in colisions. - jeremiah http://fakemind.com

Share on other sites
generally, one either kills the other, or they bounce.

--- krez (krezisback@aol.com)

Share on other sites
Or if it is turn-based, a new scene is rendered showing the battle between two enemies.

Share on other sites

Well, I have been working on a vehicle physics tech demo, and most everything is collision.

What I do is take both entities and where on the entity that the collision occured and determine how much rotation to give each entity. Then I have them both exchange velocities.

So if you have a space ship floating in space, not moving, and one rams into the side, it will bounce away, and the one that rammed it should lose all its momentum.

I would explain how to figure out the angular momentum if I wasn''t lazy. If you need it I will post some pseudo code...

Share on other sites
You have them both exchange velocities? What happens when a speck of dust flying about at the speed of sound hits a planet? Surely it''s not too hard to do some real momentum calculations...

Share on other sites
That was exactly what i was thinking...

But, if you would exchange the velocity divided by the entity''s volume, you vould get a more satisfying result...

The proccess of caltulation the volume of a collision-sphere is simple math:

V = (4 * PI * r^3) / 3

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 101
• 11
• Forum Statistics

• Total Topics
632974
• Total Posts
3009664
• Who's Online (See full list)

There are no registered users currently online

×