StaticMesh,constraints and rotating
Posted: Tue May 22, 2012 9:25 am
Hi Norbo
I created a rope/chain that consists of boxes that are connected using the DistanceLimit. The first element of that chain should be attached to a StaticMesh (by a DistanceLimit constraint for example), but unfortunately, the DistanceLimit does support only entities, which the StaticMesh is not. So I created a very small kinematic sphere and attached the chain to that sphere. In the update call is set the WorldTransformation of that sphere to that of the StaticMesh. Is this the correct way or is there any more proper way?
The reason why I do this is because the StaticMesh rotates, this leads me to the next question: Is is proper to just set the wolrdtransformation of the StaticMesh to a custom rotation matrix? I'am asking because often the chain falls trough the static mesh, so I gues this is not the right way. Also I'am not sure if that StaticMesh is a good idea, should I rather use a InstancedMesh or a CompoundBody and use constraints to allow rotation but no translation?
By the way: I have to say once again that your engine is just awesome, thank you very much!
I created a rope/chain that consists of boxes that are connected using the DistanceLimit. The first element of that chain should be attached to a StaticMesh (by a DistanceLimit constraint for example), but unfortunately, the DistanceLimit does support only entities, which the StaticMesh is not. So I created a very small kinematic sphere and attached the chain to that sphere. In the update call is set the WorldTransformation of that sphere to that of the StaticMesh. Is this the correct way or is there any more proper way?
The reason why I do this is because the StaticMesh rotates, this leads me to the next question: Is is proper to just set the wolrdtransformation of the StaticMesh to a custom rotation matrix? I'am asking because often the chain falls trough the static mesh, so I gues this is not the right way. Also I'am not sure if that StaticMesh is a good idea, should I rather use a InstancedMesh or a CompoundBody and use constraints to allow rotation but no translation?
By the way: I have to say once again that your engine is just awesome, thank you very much!