Rigidshape object does not stay on the ground. Why is this?
by andrisalim · in Artist Corner · 07/06/2011 (12:35 am) · 5 replies
Hi everybody,
I hope I'm posting on the right category of thread.
I'm running into a situation where I have an object that does not stay on the ground after free fall. It is rigidshape. I created it by using lightwave modeler. Take a look at the pictures below...


The first image shows that the dice is floating above the ground, while the second image shows that the player model stays on the ground.
Why is this happening???
I hope I'm posting on the right category of thread.
I'm running into a situation where I have an object that does not stay on the ground after free fall. It is rigidshape. I created it by using lightwave modeler. Take a look at the pictures below...


The first image shows that the dice is floating above the ground, while the second image shows that the player model stays on the ground.
Why is this happening???
About the author
Torque is new and interesting to me. I am keen in learning and sharpening my knowledge of Torque, especially Torque 3D which I am currently working with. :) Cheers, Andri Salim
#2
Currently my collisionTol = 1.0. When I adjust it to 0.1, it stays on the ground.
However the problem arises here, when my collisionTol is = 0.1. The dice didn't really detect the collision on the wall and it will flies through the walls.
Is there any idea about this? My guess is that the bounding box, but I can't figure it out how it is supposedly work...
07/07/2011 (6:27 pm)
Thanks for your input Glen. I also just figured it out that by adjusting the collisionTol in rigidshape datablock is affecting the above issue.Currently my collisionTol = 1.0. When I adjust it to 0.1, it stays on the ground.
However the problem arises here, when my collisionTol is = 0.1. The dice didn't really detect the collision on the wall and it will flies through the walls.
Is there any idea about this? My guess is that the bounding box, but I can't figure it out how it is supposedly work...
#3
Are you exporting the object as .dts or Collada?
I know with the LW2DTS exporter for Lightwave you can export out a .dts file with the bounding box. I am not sure how it works as a Collada export.
Glen
07/08/2011 (6:45 pm)
Not sure about that. Once it leaves my area the rest is up to programming. Are you exporting the object as .dts or Collada?
I know with the LW2DTS exporter for Lightwave you can export out a .dts file with the bounding box. I am not sure how it works as a Collada export.
Glen
#4
These are my current values, and they mostly work most of the time:
Depending on terrain scale, object scale, etc. these values will need to be altered and so far it seems empirical experimentation is the only way to find the right values for each situation.
08/11/2011 (1:12 pm)
This is not an art issue - it's an issue with RigidShapes in general. You will have to fiddle with your collision and contact tolerances until it behaves as you want it to (most of the time).These are my current values, and they mostly work most of the time:
collisionTol = 0.25; // Collision distance tolerance contactTol = 0.3; // Contact velocity tolerance
Depending on terrain scale, object scale, etc. these values will need to be altered and so far it seems empirical experimentation is the only way to find the right values for each situation.
#5
For physical collision/dynamics, AFAIK, it determines "hits" not by 'raycasting to a face', but by using vertices. In other words, try making each of your die's faces into 4 quads each (basically, subdivide your cube once). Try that.
This also counts (maybe even more so?) for the surfaces that the die object is going to be hitting/bouncing off of. If you have a huge flat surface with the vertices of those faces 'far away' from each other, the physics calculations may be quite inaccurate. Again, subdividing it may help.
Of course, while this does make it more accurate, it also slows down the calculations...so it's kind of a trade off to find a good compromise.
Now that I've said all that...I'm not sure if "game physics" uses different calculations than a 3d package. So...uh...I guess all that I said could be completely pointless. But it may be worth a shot anyway...
^_^
Paul L. Ming
08/29/2011 (7:22 am)
Hiya.For physical collision/dynamics, AFAIK, it determines "hits" not by 'raycasting to a face', but by using vertices. In other words, try making each of your die's faces into 4 quads each (basically, subdivide your cube once). Try that.
This also counts (maybe even more so?) for the surfaces that the die object is going to be hitting/bouncing off of. If you have a huge flat surface with the vertices of those faces 'far away' from each other, the physics calculations may be quite inaccurate. Again, subdividing it may help.
Of course, while this does make it more accurate, it also slows down the calculations...so it's kind of a trade off to find a good compromise.
Now that I've said all that...I'm not sure if "game physics" uses different calculations than a 3d package. So...uh...I guess all that I said could be completely pointless. But it may be worth a shot anyway...
^_^
Paul L. Ming
Torque 3D Owner gdebello
If the Pivot is not set correctly to the object then this could happen.
Glen