Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are collision groups removed from "REV" version? #24

Closed
QuaziKb opened this issue Jan 30, 2015 · 7 comments
Closed

Why are collision groups removed from "REV" version? #24

QuaziKb opened this issue Jan 30, 2015 · 7 comments

Comments

@QuaziKb
Copy link

QuaziKb commented Jan 30, 2015

Collision groups don't seem to be present in REV version, in fact im quite confused what the difference between the REV and regular Oimo versions is. REV seems to have cylinder support but dev seems to have been modified most recently. What is the most up to date version of Oimo.js? why are there two different builds ??? And why are the features different between the builds, with some big things having been removed / not present in one file to the next?

@lo-th
Copy link
Owner

lo-th commented Jan 30, 2015

is the dev version
speed improved, more broadphase, more logical
rev is the basic test dev the best optimised version and yes many differency.
cylinder suport on rev is not finish and have many bug.

think like this
rev is the old grand'pa dev is the young child

@QuaziKb
Copy link
Author

QuaziKb commented Jan 30, 2015

hmm okay, i figured so much after reading through the code. I'm trying to figure out how to port over cylinders. Most of the code seems to be copyable from rev to dev, but the whole collision handling system has changed as you mention. so far i'm trying to understand how the collision handling has improved / changed from using "result.addContactInfo" in REV to "manifold.addPoint" in DEV

ContactManifold seems to have completely superseded CollisionResult then?

can you explain some of the main changes between the two that i'd have to be aware of when porting cylinders over? i made the necessary changes to the proxy generator and updated it to use setup mass, but my objects just disappear when they collide, so i'm missing something, it might be an error in some of the other stuff i changed though. I'll have to do more investigation but any help would be appreciated. I'm using this to figure out just how contacts / shapes are handled so i can figure out how to improve the system

@lo-th
Copy link
Owner

lo-th commented Jan 30, 2015

the main process of dev is in collision/narrowphase
for each new shape you have to add collision for other shape
and next add final declaration to world.js line 59 this.detectors...

@QuaziKb
Copy link
Author

QuaziKb commented Jan 30, 2015

I've done the last two points you made, i'll investigate collision/narrowphase.

I think i've gotten sphere-cylinder to work right now somewhat, but no luck with cylinder+cylinder as of yet.

Also for some reason in your cylinder code from REV, the moment of inertia around the y axis is calculated as [(1/2) x radius x radius], but i'm pretty sure it should be [mass x radius x radius] for a cylinder. Any reason why it was done that way or just a typo?

@lo-th
Copy link
Owner

lo-th commented Jan 30, 2015

yea rev code of cylinder is not good

@QuaziKb
Copy link
Author

QuaziKb commented Feb 4, 2015

I've modified the DEV version to use a modified version of the rev cylinder code which uses manifolds / etc. I'm in the process of making it use OIMO_ARRAY_TYPE instead of normalwidth etc. Any extra changes I should make for it to be suitably merged into DEV? also how should i go about including these changes. Right now i've got a directly modified "oimo.dev" build, but i don't know if i have to make the pull requests on individual components.

Also, theres a variable name "dimentions" used in shapes, but the word should probably be "dimensions" instead, as this is the correct spelling.

Going to try and implement some triangle mesh / polygon soup support after this. I'm thinking we'll need octree for a secondary "broadphase"/"midphase", or at least a spatial hash (but the triangles will be rigid/static so i'd imagine an octree would work better in this case) but i'm not sure if this is the best way to tackle it. Have any insight that might help? this is a nice discussion on the topic : http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=4&t=592

as far as i can tell you're using SAT for most collisions right? i haven't looked deep into your code as i'm not planning to reverse engineer anything if i can just ask you :)

I'd also like to investigate the problem of objects "tunneling" into each other, it seems they aren't pushed out of a penetration adequately.

@lo-th
Copy link
Owner

lo-th commented Feb 4, 2015

wow cool, yes you can pull requests or if many change create new version DEV2
OIMO_ARRAY_TYPE is better if you have fixed length
yes dimentions is in french :)
triangle mesh / polygon should be the best update but is not easy maybe look at cannon.js is a pure javascript engine to.
SAT is far the best method in any case

amirebrahimi added a commit to amirebrahimi/Oimo.js that referenced this issue Jun 26, 2015
I'm offering this documentation update to newcomers who may wonder what the differences are between the two versions. I missed that this question was already asked in a github issue, so it's a small way of giving back.

Resolves: lo-th#30
See also: lo-th#24
@lo-th lo-th closed this as completed Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants