Colludium's Forum Posts

  • matriax,

    I am sorry, the modification I tried to make would require you to restart the layout once the world scale setting has been changed - it is not possible to implement the change I want to make to the engine via events. The problem is caused by the way the plugin starts inside c2/c3 - the world is created before any events take place, and changing the world scale after the world has been created would cause all sorts of other problems.

    Short term solution: you can change the setting in the plugin yourself using Visual Studio Code / Notepad++ etc. Search for:

    this.data.worldScale = 0.02;[/code:3je73aih]
    
    Then replace [code:3je73aih]0.02[/code:3je73aih] with [code:3je73aih]0.1[/code:3je73aih]
    
    Long term (hopefully later today...) I will try to make a helper plugin that, if loaded inside the project, the Box2D+ plugin will change the world scale.
  • matriax - already on it. I will give a World global setting Action to choose between Default (0.02 scale) and Large (0.1 scale). Should take 20 mins.

  • matriax, the minimum size is a 'feature' of the r2.3.0 Box2D library I used - there is nothing directly that I can do to affect it.

    What I can do is provide you with a method of changing the default world scale. It is currently a hidden value (0.02 - same as for standard Physics). If it is changed to 0.1 then the plugin will support 1 pixel tilemaps (I just tested it and it works ok). If the number is set too high then the plugin library's collisions become visible (objects that should be at rest appear to jostle and move around). Of course, the world gravity will have to be changed as well. Would this suit your needs - it'll take me a few minutes to add a method to do this and then upload?

    Edit - I will create another draw example (the one in the demo broke because of changes to the plugin).

  • matriax,

    Thanks for the bug report - apologies for you finding it immediately upon purchase. The plugin supports a minimum vertex length of 2.5 pixels - I hadn't anticipated anyone using a tilemap where each tile is 1 pixel long (if I understand you correctly). It is highly likely that the engine will not support such a small tile size. Please let me know if this is going to be a problem for you and I'll try to help any way I can.

    Edit: I have tested the minimum tile size - the minimum size that is supported is 3 pixels (assuming a box collision shape per tile).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Update: v 1.13

    Bugfix: type-o in the runtime.js file. Please re-upload to get the latest version.

  • matriax, feel free to pm me a link - as long as it's not too complex then I'll be able to take a look today .

  • Hi matriax,

    [quote:20j95b4e]Your physics behaviour fixes the default physics behaviour problem on creating/destroying lots of instances?

    I imagine that if you spawn a huge number of objects then you could run into memory problems. However, I just tested a spawn of 1000 circle shapes and there was no problem on my poor old laptop. I don't know what caused that error you showed in the standard Physics plugin - the Box2D+ is more a up-to-date version of Box2D, but it may well carry the same limitation.

    [quote:20j95b4e]I saw your samples on you draw a polygon and this one falls with physics,etc... your physics behaviour can do that? or there is any kind of helper like the platform Box2D+ but for destruction?

    Box2D+ allows you to change the collision shape at runtime to anything you want. You just define the shape in an array object (vertices as fractional values of width/height to describe points measured from the midpoint - ie, a bottom right corner would be [0.5, 0.5]) and then load it into the object as an array.AsJSON; the plugin does the rest. You can have any polygon shape you want as long as it's simple (no crossing edges, or the plugin will give you a box shape), convex or concave are supported of course. It's not magic - but I like to think it's a helpful port of Box2D . The demo I created used Canvas objects to draw the shapes with the same vertices loaded into the Box2D+ plugin to assign the shape in the behavior. The plugin has an acceptable shape check and that was used in the demo to stop the drawing if the shape was about to become complex.

  • Colludium

    is it possible to set collision category&mask bits for object instances individually?

    or only object types?

    Hi. Yes, collision filtering settings are defined per instance.

  • Fixed for me

  • WOW ! it seems very useful for me . Is this plugin compatible with (cocoon canvas + ) export ?

    Hi - I hadn't developed it for cocoon.io. However, I just tested a project.zip in the cocoon developer app and it didn't work, so I guess that it's not compatible with Ludei's accelerated canvas...

  • Update v 1.12

    Bugfix: Setting rotational velocity clamp set an incorrect value.

  • Update v 1.11

    Bugfix: Expression Angle of Motion

  • just bought your addon for construct 3. Im struggling with impulse at angle. Can you help me by this? i want the box to go at the direction the mouse is at for example: angle(Self.X,Self.Y.Touch.X,Touch.Y). The box only starts rotating but dont go to the direction of the mouse, i dont know why?

    Hi Xh3maa,

    Your problem helped me find a bug (thank you!) although the bug may not have been the cause of your problem. If you apply a force or impulse to an object and don't want it to rotate then you have 2 options:

    • Apply the force at the center of mass. The Center of Mass X and Y values are Expressions in Box2D+. If the origin is not in the center and/or the body's shape is not symmetrical about the origin then this is the only way to do this accurately.
    • Alternatively you could set the body Prevent Rotation to True, if you don't want to use the Center of Mass Expressions.
  • Update:

    Bugfix, v 1.10

    Fix angle calculation in apply impulse at angle Action.

  • Great, thanks for porting this over. Playing with it now (the demo).

    Thanks

    Updated to v 1.10 - bug fix.

    Edit - now v 1.12 - bug fixes.