after collision detection?

Started by
5 comments, last by fakemind 22 years, 3 months ago
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
- jeremiah http://fakemind.com
Advertisement
generally, one either kills the other, or they bounce.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Or if it is turn-based, a new scene is rendered showing the battle between two enemies.
------------------------------Put THAT in your smoke and pipe it
There's a thread on the Allegro website about this:
http://www.allegro.cc/ubb-bin/ultimatebb.cgi?ubb=get_topic&f=5&t=000152
I sent a long post there that looks like it might turn into an article.


Edited by - AndyMan on December 18, 2001 10:31:35 PM


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...
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...
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
delete this;

This topic is closed to new replies.

Advertisement