Collision Mesh

Can someone tell me why is smiley ignoring my collision mesh(arena2)? If you use scene1 it works.


I am really stucked on this. Any ideas?

I get this warning “:linmath(warning): Tried to invert singular LMatrix3.” on arena2. Can you upload sorce .blend file?

Hi, I solved it just right now… all day spent on this :angry: F-word

warning for all:(edit) DONT SCALE OBJECTS TO 0 (if you do, dont export them)

Hmm. I has hadn’t any problems with the Empty. How You assign the Collide option? Directly on the Mesh or on the Empty?

on the mesh, you can look into egg file, delete the empty object and it will work

Seems that you have too small scale matrix on your Empty. I set the matrix to the following form

  <Group> Scene {
    <Transform> {
      <Matrix4> {
        0.00100 0.000000 0.000000 0.000000 
        0.000000 0.00100 0.000000 0.000000 
        0.000000 0.000000 0.00100 0.000000 
        0.000000 0.000000 0.131564 1.000000 

and problem has gone.

Yeah, that is right. If the object or parent object is scaled to 0 then collision doesnt work but why?

I read somewhere in the manual, that applying scaling to the collision geometry is generally not advisable. I can not exactly say why. I just basically try to avoid scaling.

A scale of 0 means that your object is infinitely small, and produces a non-invertible (singular) matrix, which is what causes the warning. It’s kind of like dividing by zero, but for matrices.

Simply avoid setting your scale to 0. Also, keep in mind that child nodes inherit the scale from their parents, so if the parent has a scale of 0, the child will too.

Of course, if the exporter is exporting your empty as having a scale of 0, then that is a bug in the exporter.

No - the original scale is not zero - it’s 0.0001. I just changed scale from 0.0001 to 0.001.

Because of Panda’s internal caching optimizations, scales of 0.0001 or smaller can appear to be the same as a scale of 0. In single-precision math, it’s likely to be the same thing anyway.


Thanks, will try to accommodate this.

An Empty exported from Blender should have a scale of 1 to avoid any kind of confusion with regards to copying transformation matrices or reparenting - I’m not sure that it makes sense for an Empty to have any other scale (unless such a scale was explicitly set in Blender itself).

When I want to make something flat I used to scale it to 0. The empty was cube so I scaled it 0 and then these problems came.

OK, my mistake, I thought that the object in question was an actual “Empty” object in Blender, rather than just an empty object.

Hmm. It’s strange, but in the Blender I can “apply scale” (bake) to the mesh object and can’t - to the Empty. Seem that if I want to do this, I should manually recalculate matrices of all exported objects.