Advertisement

3D Manifold Collision Response

Started by April 28, 2018 05:39 PM
26 comments, last by Dirk Gregorius 6 years, 8 months ago

@Randy Gaul, @Dirk Gregorius,

could I find the center of the manifold then apply 1 central impulse?

Edit: left reply on last page too

Reject the basic asumption of civialisation especially the importance of material possessions

I tried this very long time ago. I built a weighted center though. Each manifold was weighted by it relative velocity to pull the point towards where the action is. It was good for some cases, but it is not a general solution.

 

 

6 hours ago, Cacks said:

The difficulty level has become very high for my 'simple' game

A quick estimate: it would take 4 months to get this all working

Game dev is tough!

GameDev is about good decision making and scoping. You can use a physics engine and would not need to worry about any of the technical problems at all. There will be some time to familiarize yourself with the physics engine, but it will be in the order of a few weeks and not months with a lot of risk of failing.

Advertisement

@Dirk Gregorius,

I was going to use Bullet SDK originally but I couldn't find good documentation

My game is small & I thought the game engine couldn't be this difficult but it has been very difficult

Reject the basic asumption of civialisation especially the importance of material possessions

Yes this stuff requires quite a bit of prerequisite knowledge. Also choosing good algorithms that actually work is very difficult and often takes some trial and error. Quite a bit of bad advice out there to get in the way as well, or useless info. But for now luckily you can ask questions around here and get some good answers :)

While we are at it, some more inertia tensor links:
http://number-none.com/blow/inertia/bb_inertia.doc
https://archive.org/details/GDC2013Melax

Thanks @Randy Gaul,

that video looks really good, he explains how to create Inertia Tensor in it thanks,

Yeah, I've wasted so much time going down wrong avenues, floating point errors have ruined many of my attempts

Good to be able to chat with people who know about these complicated things,

cheers

Reject the basic asumption of civialisation especially the importance of material possessions

Yes, the key point there being he didn't do the calculus by hand. Instead he plugged it into wolfram alpha. It ended up timing out with the full equation, so he cut the equation up into smaller pieces and fed those into Wolfram Alpha. Then stitched them back together again for the final result.

Just goes to show that hand-deriving these things from scratch or dipping into the derivations can get very involved. So if you're just trying to make a nice library for your game, it's probably not needed to really understand the derivation. Just use Dirk's nice code and call it good would be my suggestion.

Advertisement

@Randy Gaul,

yes I think using the formula he has created would be best

There are other parts of my library like Quaternions I don't really understand the maths

Reject the basic asumption of civialisation especially the importance of material possessions

@Randy Gaul, @Dirk Gregorius,

I've been reading up on collision responses

I don't have time to create the complex solvers so I want to use sequential impulses

Due to the conservation of linear & angular momentum I should be able to sequentially iterate over all collisions' contact points & apply the impulse formula & that should work with a bit of tweaking?

Reject the basic asumption of civialisation especially the importance of material possessions

Links in my first post are all about sequential impulses :)

@Randy Gaul,

there is an awful lot to understand though & that takes a lot of time :(

Previously to using manifolds I used Polyhedra intersections & used the center as my collision point

I used the linear impulse formula with tweaks & had good results for my collision response

But when I added the angular impulses my collision detection broke down

Would it be enough to iterate over all the collisions' contact points & calculate the impulses sequentially?

Reject the basic asumption of civialisation especially the importance of material possessions

This topic is closed to new replies.

Advertisement