Vclip: point of contact

Started by
4 comments, last by Carmine 13 years, 11 months ago
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?
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
Team leader of stillalive|studios
our current project: Son of Nor (facebook, [twitter]sasGames[/twitter], website)
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)
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!
Team leader of stillalive|studios
our current project: Son of Nor (facebook, [twitter]sasGames[/twitter], website)
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)
Great!!! It works!!!!
Thanks a lot for your advise!!!

This topic is closed to new replies.

Advertisement