Hi everyone! I haven't made a game with ZimJS in a while, and now I've run into a problem.
I'm connecting everything according to this example: ZIM 017 - Outline - Code Creativity
And then I don't see the images I add in Adobe Animate. I don't understand why.
They're just missing, just empty.
I connect it like this: script type="module">
import ZIM from "./ZIM_physics.js";
/script>
But if I connect the SDK differently:
ZIM Slingshot 1 according to this example.
script src="https://zimjs.org/cdn/1.3.2/createjs.js">
script src="https://zimjs.org/cdn/cat/01/zim.js">
script src="https://zimjs.org/cdn/Box2dWeb-2.1.a.3.min.js">
script src="https://zimjs.org/cdn/physics_2.1.js">
Then my images appear, but the function for adding physics to non-standard bodies doesn't work. I get the error "Uncaught TypeError: m.physics.makePoly is not a function"
if I try to add physics to a trapezoid, for example, or an image.
How can I solve this? What am I doing wrong?
That is, I add a picture by simply transferring it to the scene in Adobe Animate, and in the first case it will not be there, and in the second case it will be there, but there will be no physics of bodies other than a triangle, square, or circle.
And one more question.
ballh = new Circle(50,blue)
.center() .addPhysics({dynamic:true, contract:-5})
So I set the contract to -5, but why can't I change it to a different number later? How do I do that? I wanted to do ballh.contract = 30; but that doesn't change anything.
And the body is in flight or just before flight at this time, so I can't recreate it.