R0J0hound's Recent Forum Activity

  • 2048x2048 is just the text I used, however the error will occur if the texture size is bigger than what your system supports.

  • Updated to version 1.6.

    Download in first post.

    * Fixed: The "Query closest line segment" condition would fail to hit some tiles of a tilemap. See note [1]

    * Added: Changing a tilemap with this behavior will now update the collisions. NOTE: If the tilemap also uses C2's included physics behavior then whichever behavior runs first will update, the other won't.

    * Change: The "imagepoint" option for attaching joints now attaches to the "origin" if 0 is used and the Center of Mass (COM) if -1 is used. Previously 0 would use the COM. spongehammer

    Note [1]:

    Prominent mattb

    The bug would occur if PointA x was the same as the left or right of the tile, or if PointA y was the same as the top or bottom. Strangely enough the bug is also present in the original c library too.

    Also I don't generate the collision polygons for the tilemap. I use the polygons that the tilemap provides, which looks very decent.

    If I instead used a polyline instead of boxes there would be the possibility to get stuck inside.

  • spongehammer

    When you use "imagepoint" it just takes an imagepoint number. So 1 for the first imagepoint, 2 for the second...

    0 currently uses the object's center of mass instead of the origin. The built in physics does this, but I think it may not be very intuitive. Thoughts?

    So with "imagepoint" use

    1, 0 for the first imagepoint

    0, 0 for the center of mass

    If you use "layout" you can use:

    Sprite.ImagePointX(0), Sprite.ImagePointY(0)

    or

    Sprite.X, Sprite.Y

    Prominent mattb

    It looks like a bug in the js library itself, so it may take longer for me to debug. If you move the tilemap 1 pixel to the right it works flawlessly, oddly enough.

  • I'll look into it tomorrow, it's probably some typo in my code. I'm guessing the shape for that tile wasn't created. Can a body drop through it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Updated to version 1.5

    Download in first post.

    * Change: Renamed the conditions in the "Query" group to with more intuitive titles.

    * Fixed: query conditions now work with families.

    * Fixed: some of the query conditions were not working with concave polygons or tilemap.

    mattb

    That's a cool example. Also thanks for the family bug report.

    Prominent

    It's now fixed.

  • mattb

    Here's an example of the line segment casting. The query conditions also set it's query expressions which can give normal and hitpoint.

    "pick overlapping line segment"

    Picks all object's whose shape overlap the line. In addition to picking the objects, info about where the line hit, and normal are accessible from expressions which all start with "query".

    "raycast and pick first hit"

    It's about the same as the one above, but it only picks the first object hit. It also gives the ability to filter out objects by collision layers or group. It sets the query expressions as well.

    Note

    :

    "pick overlapping line segment" isn't working all the way with concave polys or tilemaps, but the other condition is working fine.

  • Updated to version 1.4:

    Link on first post.

    * Added the new icon. Credits to

    * Added: Polygons can now be concave. Internally they are converted to convex polygons.

    * Added: Tilemap objects now work. See note[1]

    * Fixed javascript error with "line segment query" condition.

    * Fixed bug with queryNormY expression. Was the same as queryNormX.

    * Change: The default sleepTimeThreshold is now 1 second. It was 0.5 before, and objects fell asleep to quick.

    * Joints updates:

    • Added the ability to use a postion on the layout or an imagepoint to determin where to connect to objects.
    • Added: Now you can attach joints to the layout by using -1 for the uid of the second object.

    [1] Tilemap notes:

    Tilemaps ignore the "collision shape" and "prevent rotation" will always be considered "yes".

    The area expression for tilemaps will return 0.

    Changes to the tilemap are not detected currently, so the collision won't change if the tilemap is changed. A workaroud is you can force an update by changing the size of the object.

    Prominent

    The collisions won't automatically be updated if the tilemap is changed. You can manually force an update by changing the tilemap's width.

    -cheers

  • mattb

    The "pick overlapping line segment" should do it, but it seems to be bugged in the last version I uploaded. The fix will have to wait till I finish with the other stuff I'm adding, which is requiring lots of code changes.

    Stuff like this:

    https://dl.dropboxusercontent.com/u/542 ... index.html

  • Update:

    I touched up the "copy from canvas" action so the texture should never be flipped. It's not completely polished but it should be useable.

    Note:

    For me on chrome it grabs the image from 4 frames ago. I don't know if that can be changed.

    Also as for now the bug where the opacity of a pasted object is ignored if the object has an effect, is still not fixed.

  • Nitro187

    You're right there is no angular damping at all so the object would accelerate indefinitely. It can be useful though so I may eventually make damping built in.

    The way to disable collisions between object's is to use collision groups and layers. They aren't colliding because they both are in the same collision group.

    Actually box2d doesn't work with concave objects either, both libraries need the concave polygons to be converted to multiple convex ones. The built-in physics behavior does this automatically for you, but this behavior doesn't yet.

    mattb

    -1 has a useful meaning for uids that means no object. Instead would being able to type "world" be better? It would make it more clear what was intended.

  • neverk

    You can do it with a loop by pasting a line at a time. It's fast enough to make the image but not necessarily enough to do every frame.

  • Nitro187

    "Set torque" does what it says, it set's the torque. The only difference to apply torque is possibly adding to the torque, but you can do this with "Sprite.chipmunk.torque + something".

    Here's it working with chipmunk