[SOLVED] addComponent: box!

entity.addComponent("model", {
    type: 'box',
    halfExtents: new pc.Vec3(width, height, length).scale(0.5),

Why does halfExtents property not work in model, but works in collision? What is the principal difference?
Do I need to just use scale on the model?

Scale doesn’t affect the collision component. Perhaps it could and perhaps it should, but it doesn’t (at the moment). Maybe we’ll change this some day.

But for now, you use scale to resize the graphical box and use half extents to match its size for collision.

1 Like

Thank you. No problem, just confused. Well, halfExtent is half model scale :)))))