I have a problem positionning a shape in a body.
My code is pretty simple:
var body = new p2.Body({
mass: 0
});
var box = new p2.Box({
position: [50, 50],
width: 50,
height: 50
});
console.log(box.position);
body.addShape(box);
console.log(body.shapes[0].position);
Hello,
I have a problem positionning a shape in a body. My code is pretty simple:
(avalable in this codepen: https://codepen.io/dooxe-the-reactor/pen/WNQwVQE )
The first
console.log
display well the position of the shape:[50, 50]
, But the second log display[0 , 0]
.Is that an intended behavior ? If so could you explain me how to position shape in a body ?
Thanks a lot