Hey guys i tried to add a box collision to my entity, but not sure if this is a right way of setting its scale
when im changing radius and height of cylinder collision it works but box has different attributes probably
Hey guys i tried to add a box collision to my entity, but not sure if this is a right way of setting its scale
when im changing radius and height of cylinder collision it works but box has different attributes probably
Hi @smokys,
For a box collider you need to do it this way:
newBox.addComponent("collision", {
type: "box",
halfExtents: new pc.Vec3(5, 5, 5)
});
The properties can be found in the API docs here: https://developer.playcanvas.com/en/api/pc.CollisionComponent.html
Thank you, working… solved