   PhysX to Havok problem
  Hi all,I used PhysX for a while and now, since Havok is free and all, I gave it a try. But I found a few subtle differences that do not translate well. In PhysX, every object in my game consists of a single actor with multiple shapes, each shape having its own transformation and collision parameters. When animating the object, I just change the transformations of the shapes directly. So if a car opens a door that is pressed against a wall, the door will open and the car will be pushed away from the wall. This is slightly unrealistic, but it almost never happens and implementing animations that way is much simpler (My game is an RTS btw).Implementing something similar in Havok however does not seem possible. I could use a compound shape for each object, but it seems that you are not allowed to change the (transformations of the) shapes in a compound object. However, creating a separate collider for each shape and waxing them together with constraints does not seem like a good solution, first of all it would result in many constraints, and second of all, shapes within one object should not collide with each other. Although the last point might be fixed with filtering, I don't know if this is a reasonable fast solution.So my question is, does what I concluded make any sense and if so, what would be the right way to implement something similar in Havok?Thanks,Dietger[Edited by - dietepiet on May 24, 2009 6:08:04 AM]
  not sure if it helps but you could try looking at the pal physics engine project, i think they have a havok/physx interface;  Hi Dietepiet,You should use a hkpTransformShape/hkpTranslationShape. This will let you displace the children of a hkpShapeList or compund shape. The latter is slightly faster, but I'm not sure what your requirements are from reading your post.Havok is slightly lower level than PhysX, and a few of these 'issues' are abstracted away in PhysX while not in Havok.   ;Quote:Original post by SymLinkedHi Dietepiet,You should use a hkpTransformShape/hkpTranslationShape. This will let you displace the children of a hkpShapeList or compund shape. The latter is slightly faster, but I'm not sure what your requirements are from reading your post.Havok is slightly lower level than PhysX, and a few of these 'issues' are abstracted away in PhysX while not in Havok.From the documentation of Havok, I understand that you may not change the transformation from a hkpTransformShape after it has been added. So how would I apply an animation directly to such a shape? I don't see any such method, other than appliing force or impulse to the whole object using havok dynamics.Also, I don't see any way to discriminate between shapes within one collision object. For example, one part of the object should be used for ray-casting only and not for general collision detection. This kind of discrimination is possible in PhysX. Quote:not sure if it helps but you could try looking at the pal physics engine project, i think they have a havok/physx interfaceI will definitely look into this project and how they achieved such an interface.   