Comments (2)
I recommend you to read the Real-Time Collision Detection Book, the collision detection of cyclone code is based on the book.
you will find the related information on the AABB, OBB intersection tests.
from cyclone-physics.
This may be related to this isssue.
The only problem I'm seeing (so far) with the BOX SAT is that it fails when the axes being compared are exactly parallel.
The comparison happens here:
https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L111-L119
and
https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L80-L84
If the two boxes are oriented on the same plane (e.g. the ground), their X, Y and Z-axis will be parallel and the resulting cross product will be 0.
I've worked around this changing the overlap comparison from <
to <=
return (distance <= oneProject + twoProject);
This covers the case where distance
is exactly 0 due to axis
being a 0-vector. Obviously with this modification the SAT now succeeds in the rare case where the axis projections are exactly adjacent and not overlapping, but I find this to be an acceptable compromise for my own engine. YMMV.
Finally, note that the box intersection test is commented out in the contact generation code:
https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L415
Not sure why.
from cyclone-physics.
Related Issues (20)
- I am a noob and I don't know how to run the project HOT 3
- Bug in BVHNode destruction HOT 1
- Is there anyway to build this example in visual studio 2015? HOT 4
- Buoyancy force appears to be calculated incorrectly HOT 15
- how to find angular velocity HOT 1
- Contacts.cpp doesn't contain implementation of applyImpulse declared in Contacts.h
- Misnomer in Rigid Body HOT 1
- Questions of calculateContactBasis() of The contacts.cpp HOT 2
- Unclear variable names in contactPoint(...) in collide_fine.cpp HOT 4
- Question: Restitution causing explosive forces with friction HOT 2
- Wrong order?
- wrong calculation of total inverse mass HOT 1
- typo in contacts.h
- Does not compile for VS2019 HOT 1
- DELETE THIS
- Why dividing core.h and core.cpp?
- the implmentment of void setOrientation(const Quaternion &q) need to be transposed
- Issue with Collision Box - no rest pose is reached HOT 3
- Missing `AngledAero` force generator implementation
- Question regarding calculateDesiredDeltaVelocity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclone-physics.