Sign in to follow this  
Carmine

Vclip: point of contact

Recommended Posts

Carmine    100
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
Black-Panther    157
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
Carmine    100
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
Black-Panther    157
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
Carmine    100
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this