Can you create an mesh render from renderer

var newAsset = child.render.asset;
    console.log(newAsset);

    child.addComponent('collision', {
        type: 'mesh',
    });
    console.log(child);
    child.addComponent('rigidbody', {
        type: pc.BODYTYPE_STATIC
    });
    console.log(newAsset);
    child.collision.asset = newAsset.id;

Hi @ryankrediet,

Can you expand a bit on what you are looking for? Maybe you are asking if you can use a render asset as collider?

If that’s the case here is the way to assign it:

child.collision.renderAsset = newAsset.id;
1 Like