mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
attempt to handle registration point in hull collisions
This commit is contained in:
parent
90f51e7d4c
commit
8a5192c1d9
1 changed files with 3 additions and 0 deletions
|
@ -366,6 +366,9 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||||
// multiply each point by scale before handing the point-set off to the physics engine
|
// multiply each point by scale before handing the point-set off to the physics engine
|
||||||
for (int i = 0; i < _points.size(); i++) {
|
for (int i = 0; i < _points.size(); i++) {
|
||||||
for (int j = 0; j < _points[i].size(); j++) {
|
for (int j = 0; j < _points[i].size(); j++) {
|
||||||
|
// compensate for registraion
|
||||||
|
_points[i][j] += _model->getOffset();
|
||||||
|
// scale so the collision points match the model points
|
||||||
_points[i][j] *= scale;
|
_points[i][j] *= scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue