kvazmatik Posted September 13, 2018 Share Posted September 13, 2018 Hello, I'm wondering if there is way to change offest on collider. var sprite = this.matter.add.sprite(600, 300, 'diamond'); sprite.setOrigin(0.1, 0.60); sprite.setAngle(90); The sprite's offset is changed correctly but collider is on same place as before. Thanks for further reply. Link to comment Share on other sites More sharing options...
iKest Posted September 13, 2018 Share Posted September 13, 2018 http://labs.phaser.io/edit.html?src=src\physics\matterjs\offset body.js Link to comment Share on other sites More sharing options...
kvazmatik Posted September 13, 2018 Author Share Posted September 13, 2018 @iKest thanks for fast reply. But I dont get that anyway. I can change shape now but anchor still remains at center of collider. Link to comment Share on other sites More sharing options...
iKest Posted September 13, 2018 Share Posted September 13, 2018 Origin (pivot, anchor) of body is in center of mass (COM) this body and this property is non changeable. You need use composite body for manipulate COM. kvazmatik 1 Link to comment Share on other sites More sharing options...
kvazmatik Posted September 13, 2018 Author Share Posted September 13, 2018 @iKest Ok, good to know. So I'm going to use another solution for my problem. lol Link to comment Share on other sites More sharing options...
Navid Posted March 15, 2020 Share Posted March 15, 2020 it's exactly what i need to do too, did you find another solution for your problem?!? Link to comment Share on other sites More sharing options...
Recommended Posts