PhysicsImpostors without Mesh

Hello everyone short question could be I missed something in the docs but did not found it.

Is there a way to apply a PhysicsImpostor on a TransformNode?
It would be really restricting if I can only apply a collider on a AbstractMesh.
Visual and Physical behaviour should be seperated in my opinion. It would require to create a empty AbstractMesh although it will not have mesh data either it will be visible.

Best regards,

1 Like

Adding @Cedric and @RaananW our physics maestro but I am totally not sure it is possible.

Thank you @sebavan.
I would lke to add a additional question if @Cedric and @RaananW will look here.

Is it somehow possible to define the demensions of a Physics impostor regardless of the mesh.
Like the radius of a sphere on construction?

After a quick look, it seems possible to use a TransformNode as an Impostor Object. What’s mandatory for Box, Capsule, Cylinder and Sphere Collision shape is a bounding info.
So, creating a TransformNode, setting BoundingInfo and creating an impostor from that should work.
Of course, for Hull or TriangleMesh shape…well, you need a mesh :slight_smile:

1 Like

Thank you @Cedric for the answer.

really interesting behaviour :smiley: is there a particular reason why the impostors have to be so strictly coupled with the boundinginfo of a AbstrachtMesh or NodeTransform, why is it not optional and some could provide BoundingInfo/Dimensions independent from them?

I hope it doesn’t bother that I ask?

Mesh related colliders are obvious to me, but could also be that I want to
parameterize the mesh as a input to have a different physical behaviour as it looks :wink:

I guess because it’s easier. Once you have those information in the mesh/Transform, no need to send it again to the constructor of the impostor.

1 Like