- This topic has 3 replies, 2 voices, and was last updated 3 years, 10 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › How to set collision groups
Hello.
I want to set collision groups in a scene file written in C++, like this.
<TriangleModel group=”1″/>
However, the constructor is protected and cannot be accessed.
Could you tell me how to set up a collision group in C++?
Thank you very much.
pontas
Hey @mckysd5
You should be able to do as follows:
TriangleCollisionModel* myTModel = new TriangleCollisionModel;
myTModel->setName("myCollisionModelOnTriangles");
myTModel->addGroup(1);
Let me know if this suits you.
Best,
Hugo
Hi @Hugo
Thank you for your reply.
I got it!
However, I can’t have three collision modes(Point, Line, Triangle) in one node at the same time…
And when I try to determine the collision,
I get a warning in MinProximityIntersection ↓
Null distance contact between contact detected
This causes the FPS to drop below 1…
What is wrong?
Thank you very much.
pontas
Hey @mckysd5
Even if slow, is the collision well responding?
How many contacts can you see (activate the view option “Interactions”)?
Are your object in collision at the beginning of the simulation?
This must not be the case (in any simulation software).
Are your meshes clean? (no duplicated faces)
Are your collision settings (alarmContact / alarmDistance) properly set regarding the object size / your tolerance?
Could you share a simple scene creating the problem?
Could you post the full warning info you get?
Best wishes,
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.