Jump to content

How does dynamic-on-dynamic collision work?


joshcamas
 Share

Recommended Posts

I'm currently working on my AABB collision system, and I've gotten dynamic-static collision working, aka a character on a wall for example

Basically by comparing the overlap of two bounding boxes and pushing the dynamic one away...

But how should I do dynamic-dynamic?

Should I basically run the thing twice, but move each one a percentage depending on mass? Aka if both weigh the same then move the same distance apart, or if one's heavier then move it less? Should I compare just mass, or velocity, or...

Here's what I've done so far: 

 

Link to comment
Share on other sites

:)  Don't forget mass * floor-to-object FRICTION, too.

And if prostitution... errr... restitution (at mesh origin)... is more powerful than floor friction (at -Y bbox extendSize), the box might tip-over/tumble after collision rebound.  Wow! 

You know, if you place box on steep ramp with high friction*mass, box will tumble, not slide. 

Place mesh on steep ramp, set so NOT tumbling or sliding, and then do impulse-fart against up-hill side of box (aiming down-ramp). 

If you fart HIGH-position on slanted box, and box is likely-to tumble (roll) down ramp. 

Fart LOW on box, and box more likely-to slide some distance... and THEN, perhaps, start tumbling.  :o

(Wingy gets a little brain tumor by just THINKING about all that stuff.) 

It's all part of "rolling big rocks down big hills"... an early caveman entertainment (which killed MANY cavewomen who picked berries at base of mountains).  heh

"Josh B'Gosh Productions, Inc.  Re-inventing physics engines... one formula at a time."  ;)

Good to see you, JoshMonster.

Link to comment
Share on other sites

LOL well luckily this physics engine is going to be very simple. Think AABB based intersections and simple calculations. So rotation is not going to be a thing, nor friction, nor ramps, for now at least. For now I'm thinking just using 50%, then maybe adding mass proportion later. Thanks guys :)) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...