As already mentioned in the title, I am looking for a way, to disable every collision of a body in Matter.js. It should still be linkable with Constraints, and there should be the possibility of enabling the collision again after some time. Is there...
I am using Matter.js physics in an attempt to create soft bodies. I was able to create a body like this:    However I am not sure if this is the "soft body" I want. It is true that this body is not entirely rigid and has that bouncy feel when...
I'm trying to override the default canvas size that is set to: 800x600  After some digging in the documentation I found:  Matter.Render.create([options])   And the options that seem interesting are: render.options.height and render.options.width....
I am trying to detect when two object collide with each other, but I am not sure how to do it.  I have the following scene, which adds two physics images to the scene. I just need a way to detect when the two collide.  export class MainGame extends S...
I am making a physics simulation using matter.js.  My question is, is it possible to change the sprite size?  Or is that not possible using only matter.js?  This is what I have so far:  Bodies.circle(x, y, 46, {   render: {     sprite: {       textur...
I have a small example script, where I have a circle (radius:40), which falls down to the ground. But when I increase its radius to 80 then, only the graphics of the circle seem to change, but not the physics:  <html> <body></body>...
Based on the matterjs demo I also created a set of bodies that live within an area. Just like in the demo the area is defined by four static bodies that together define a box.   When wildly moving bodies with the box they somehow seem to escape by go...
I am new to JavaScript and having a difficult time understanding the following code snippet intuitively.  It is code used to make a box in some physics engine (matter.js)  function Box(x, y, w, h){     this.body = Bodies.rectangle(x,y,80,80);     thi...
I'm working with matter.js on a small project, trying to add and remove objects from a matterjs world with js functions.   the add function seems to work, the remove method only works inside the adding function-  var boxes = [];  function addCirc...
Im trying to use matterJS and render it to specific canvas in my layout but I can't manage it.  This the the JS:  window.addEventListener("load",init);     function init(){      var canvas = document.getElementById('matterJS');...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.