Hey norbo I was wondering if sometime in the future it would be possible to add a new special type object to the enigine.
A Trianguler prisim
Like this http://i.imgur.com/sr5k4.jpg
And This http://en.wikipedia.org/wiki/Triangular_prism
For doing dynamic ramps and slopes etc...
Is the math for this doable? It would obviosly be far more complex than a box or sphere but i think it would be very useful
I have tried using a convex hull but i get performance issues and accuracy issues, same deal with a compound body full of triangles...
Anyway I was just wondering if there was any chance of this in the future.
New Built In Shape?
Re: New Built In Shape?
It would be possible, though I'd probably show how to implement that externally rather than building it in. The support mapping math on that is pretty simple. Technically it could be added now externally as a custom entity type, though it may not be worth it.
Accuracy wise, it wouldn't be any better than a ConvexHull without special case handling (which would get nasty). Performance would be comparable, with a very slight advantage to the "TrianglePrismShape." If you're talking about initialization performance, that will be helped a lot by v0.15.0's ability to share collision shapes and apply inertia tensor information without it trying to calculate it first.
If the first imgur link is a picture of the dimensions in question, the overall shape appears to be pretty normal. If it isn't really tiny or really big I'd expect its behavior to be pretty decent.
Could the accuracy issues be due to mass ratios again? If the prisms are dynamic, you could try pushing the mass up to at least as high as anything on top of it. That should take any solver-based accuracy issues out of the picture so you can check for other problems.
Accuracy wise, it wouldn't be any better than a ConvexHull without special case handling (which would get nasty). Performance would be comparable, with a very slight advantage to the "TrianglePrismShape." If you're talking about initialization performance, that will be helped a lot by v0.15.0's ability to share collision shapes and apply inertia tensor information without it trying to calculate it first.
If the first imgur link is a picture of the dimensions in question, the overall shape appears to be pretty normal. If it isn't really tiny or really big I'd expect its behavior to be pretty decent.
Could the accuracy issues be due to mass ratios again? If the prisms are dynamic, you could try pushing the mass up to at least as high as anything on top of it. That should take any solver-based accuracy issues out of the picture so you can check for other problems.
-
- Posts: 136
- Joined: Sun Jan 17, 2010 11:35 am
Re: New Built In Shape?
Thanks for the info, ill try having a play around with the masses etc...
Our physics settings are fairly low for it running on the phone so yer...
Thanks.
Our physics settings are fairly low for it running on the phone so yer...
Thanks.