# Vclip: point of contact

This topic is 3124 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm using a java library of VClip, an algorithm about collision detection (I think that for C++ is the same). When I find a collision, I obtain points of contact, distances and features. My problem is that points of contact are expressed in Absolute Coordinatees but I would have points expressed in Relative Coordinatees (in other word, I have to know which is the point of the object (for istance, a vertex) that realise the contact). How can I take theese specific points? Do you know any collision response formula to compute new rotations and translactions without relative point of contact?

##### Share on other sites
If you get the nearest features, then you already got your information.
About collision response: you should really dig deeper into simulated physics, but be aware, it isn't a simple topic. You should be quite good with maths at least. In general there are several ways you may resolve a collision. I recommend impulse-based approaches to start with. Those are quite common and work well.
On the other hand, if you only want a really simple, physically hardly correct way to resolve collisions, then you may go with verlet-integration. But be aware: stacking won't be possible with this approach!
Hope that helps.

btw: Wrong forum

##### Share on other sites
When the nearest feature is a vertex I agree with you in fact, I have exactly the point that I want to find.
But if the nearest features are faces or edges, how can I find the exact point of contact?

For example, if the nearest feature is an edge composed by theese points (0,0,0) (5,0,0) and the relative point of contact (that I want to find) is (2.5,0,0), how can I obtain it by the edge? Are there methods to convert absolute coordinates in relative coordinates?

##### Share on other sites
Sure, if you only want to get those relative coords, simply transform the world-coords (the absolute ones) back into object space (by the inverse object transformation matrix). And you're done!

##### Share on other sites
Fine, so in the implementation java of vclip, which method I have to use to realise this transform?
I find this fuction:

"objectDistanceReport".transformFirstPoints("inverseMatrixOfFirstPolytree);

Is it the right method to use? If I wrong, can you give me an example of the right method?

##### Share on other sites
Great!!! It works!!!!

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 20
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633364
• Total Posts
3011517
• ### Who's Online (See full list)

There are no registered users currently online

×