Skip to content

Commit

Permalink
fix computeAABB orientation mult schteppe#433
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Yau committed May 27, 2021
1 parent 2c5cab8 commit 40329d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/collision/Ray.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Ray.prototype.intersectWorld = function (world, options) {
this.skipBackfaces = !!options.skipBackfaces;
this.collisionFilterMask = typeof(options.collisionFilterMask) !== 'undefined' ? options.collisionFilterMask : -1;
this.collisionFilterGroup = typeof(options.collisionFilterGroup) !== 'undefined' ? options.collisionFilterGroup : -1;
this.checkCollisionResponse = typeof(options.checkCollisionResponse) !== 'undefined' ? options.checkCollisionResponse : true;

if(options.from){
this.from.copy(options.from);
}
Expand Down
2 changes: 1 addition & 1 deletion src/objects/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ Body.prototype.computeAABB = function(){
offset.vadd(this.position, offset);

// Get shape world quaternion
shapeOrientations[i].mult(bodyQuat, orientation);
bodyQuat.mult(shapeOrientations[i], orientation);

// Get shape AABB
shape.calculateWorldAABB(offset, orientation, shapeAABB.lowerBound, shapeAABB.upperBound);
Expand Down

0 comments on commit 40329d2

Please sign in to comment.