Search code examples
distanceaframephysics-engine3d-model

A-camera kynematic-body can not move closely to static-body?


First of all, I'm sorry about not inlining images because of lacking reputation.

I have 2 problems with Aframe-extras by DonMcCurdy and I've read many documents but could not find the solution.

FYI, I've set kinematic-body for my camera.

Problem 1:

I can not go inside my static-body circular table:

My circular table:
My circular table

The table was made with Blender and was exported to Collada model.

I know that aframe-extras will consider my circular as a box (bounding box of the model) and it prevent me to move through that box. That's why I cannot come inside my circular table.

So that I'm going to use the solution 2, I remove the static-body from my circular table, then create a static-body "line" around the circular table myself. But I met the problem 2 below:

Problem 2:

The static-body bar (It's the red one in below image) prevent me to move closer to it, the minimum distance from me to the red bar ~1.5 unit * (1 unit = 1 meter in my case)*.

My expectation distance is 20cm.

So the final question is:

How can I move closer to it?

You can see my screenshot here:
my screenshot here for more detail.


Solution

  • The last time I looked the default radius to the kinematic-body was 1.3, that looks like it's too wide for your scene. Try setting the radius to 0.5.

    kinematic-body="radius:0.5"
    

    If that doesn't work, you may also need to check the static body and set the shape to hull.

    static-body="shape:hull"