joshcamas Posted May 9, 2017 Share Posted May 9, 2017 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: Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 9, 2017 Share Posted May 9, 2017 Interesting question As a simplification, I would say apply 50% to each? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 10, 2017 Share Posted May 10, 2017 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. (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. Quote Link to comment Share on other sites More sharing options...
joshcamas Posted May 10, 2017 Author Share Posted May 10, 2017 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 :)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.