Skip to content

Commit

Permalink
Merge branch 'main' into multicam-api
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored Nov 15, 2024
2 parents 5161f77 + 503be80 commit c40a184
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
11 changes: 6 additions & 5 deletions examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"examples": "file:./iframe",
"fflate": "^0.8.2",
"fs-extra": "^11.2.0",
"monaco-editor": "^0.52.0",
"monaco-editor": "^0.33.0",
"playcanvas": "file:..",
"prop-types": "^15.7.2",
"puppeteer": "^23.8.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const STATIC_FILES = [
once: true
},

// modules (N.B. destination folder is 'modules' as 'node_modules' are automatically excluded by git pages)
// monaco loader
{ src: './node_modules/monaco-editor/min/vs', dest: 'dist/modules/monaco-editor/min/vs', once: true },

// fflate (for when using ENGINE_PATH)
Expand Down
19 changes: 2 additions & 17 deletions scripts/physics/render-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,23 +182,8 @@ RenderPhysics.prototype.postUpdate = function (dt) {
debugShape._collisionType = collision.type;
collision._debugShape = debugShape;
}

// Use the rigid body position if we have it
if (collision.entity.rigidbody) {
var body = collision.entity.rigidbody.body;
if (body) {
var t = body.getWorldTransform();

var p = t.getOrigin();
var q = t.getRotation();
collision._debugShape.setPosition(p.x(), p.y(), p.z());
collision._debugShape.setRotation(q.x(), q.y(), q.z(), q.w());
}
} else {
collision._debugShape.setPosition(collision.entity.getPosition());
collision._debugShape.setRotation(collision.entity.getRotation());
}

collision._debugShape.setPosition(collision.getShapePosition());
collision._debugShape.setRotation(collision.getShapeRotation());
// If the shape is a capsule, cone or cylinder, rotate it so that its axis is taken into account
if (collision.type === 'capsule' || collision.type === 'cone' || collision.type === 'cylinder') {
if (collision._debugShape._axis === 0) {
Expand Down

0 comments on commit c40a184

Please sign in to comment.