• Advertisement
Sign in to follow this  

Vclip: point of contact

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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?

(in which section of forum I can talk about this topic)

Share this post


Link to post
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 this post


Link to post
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?

(thanks for your attention)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement