R0J0hound's Forum Posts

  • Somebody

    It uses a texture the same size as the paster object's texture. It's simpler since it can be created once. If the size of the object being pasted in was used the texture would have to be created and destroyed per object pasted. Also it would crash if you tried to paste in an object larger than the supported texture size.

    That being said, I'll probably make it so the second texture will only be created once an object with an effect is pasted to save memory when it's not needed.

  • Fixed the "paste object" action. It was a typo. Now it also uses an object's bounding box to cull instead of it's collision polygon.

    Did the preliminaries for pasting objects with effects and transparency. Not working quite right for some reason, but it'll have to do for now. A side effect is paster object's now need twice as much vram.

    The internal process is:

    1. draw to a blank off-screen texture with an effect.

    2. draw that texture to the paster's texture with opacity.

  • Update 2.2b

    Download in first post.

    Fixed: "idle speed threshold" action was broken.

  • Slide joints should be like pin joints, but you specify a minimum and maximum distance instead of using the distance between anchor points.

  • icepam

    I added an improved "draw quad" action that can set the texture uv's of an image. Attached is an example. It uses and updated paster plugin so you'll need to re-download it.

    Notice it still doesn't look right since without z it's an affine transformation. For a correct look the z would need to be calculated for each point and the perspective drawing would have to be done manually.

  • Cursors

    In event 4 of the capx I posted. In the capx I use -1, and in the quote I'm suggesting to use -2.

  • icepam

    That's not really possible using this plugin.

    You could of course calculate the transformation matrix from the points on the left to the points on the right, and apply the same transformation on the corners of the image on the left. It's a rough idea and a little tedious to do, especially if you've never done any matrix math. I could also instead possibly add another "draw textured quad" action that let's you specify uv coordinates to use.

    The second and probably more pressing problem is the "draw texture quad" action doesn't do any perspective correction since it has no z knowledge. It looks like "affine" in this link:

    http://en.wikipedia.org/wiki/Texture_ma ... orrectness

    So you'd either have to write an effect to do the perspective drawing or do it with math in events a pixel at a time, which is relatively very slow. The math is basically in the above link but it doesn't cover everything.

    I was able to use it a few posts back with horizontal lines but it's not enough for what you're after.

    plugin-paster_p875157?#p875157

  • Update 2.2a

    Download in first post.

    Fix: JointAnchor expressions were not giving the correct positions right away if objects were moved.

  • Interesting idea, but it is much more limiting than events and most of the behaviors would be ambiguous what they would do imo. The main tricky bit is it becomes harder to reference values you set in some levels of your node tree, since the tree is run in a way depending on what's connected. Events are simpler in that respect since they are run top down.

    That said it could be an interesting tool to make complex motion equations, but probably not in C2. It would also need some designing to flesh out what nodes you could have and what they'd do. Behaviors for instance wouldn't work so well being put anywhere because they depend on the object itself.

    I do like the concept, so I made a capx to play around with it.

  • Update 2.2

    Download in first post.

    * Fixed: Adding joints in to new objects in "post collide"

    * Fixed: Movement actions for new objects in "post collide" were ignored.

    Prominent

    In "post collide" new objects aren't added to the simulation till right after the physics step. So they won't trigger a "post collide" till at least the next frame.

  • Update 2.1a:

    Download i first post.

    *Fixed: Creating object during "pre step" or "post collide"

    kmsravindra

    It stops moving due to object sleeping.

    You can disable sleeping with the "Global Settings"->"set sleep time threshold" action. A value of Infinity is disabled.

    Document tidbit:

    The way sleeping works is the object will be put into a non-moving "sleep" state if it's idle for a time equal to or longer than the "sleep time threshold". The object is considered "idle" if it's speed is less than the "idle sleep threshold", which by default has a value based on the gravity.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, that's no good. I'm out of time today, so it'll have to wait till tomorrow. In the meantime you can try and comment out line 6714.

  • sir LoLz

    I finally tried those solutions and you can't get the tilemap to draw tiles that are offscreen. Try instead to move the tilemap onscreen, paste it and move it offscreen. That should work.

    I haven't seen the second issue you describe and I can't reproduce it.

    frcol

    "Paste object" will draw the specified in place wherever it overlaps the paster object.

    See the attached example.

  • Finally saw this. Glad you got it working.

  • Updated to 2.1

    Download in first post.

    *Fix: Setting object to immovable after creating a joint in a "pre step" or "post collide" condition. Actually the fix should correct any errors claiming stuff is being added twice.

    *Fix: Setting immovable to No when it was immovable caused and error.

    *Fix: Angle would become nan if both connected bodies of a joint were immovable.

    *Fix: choosing 'Is disabled' condition would give 'For each collision pair' instead.

    *Fix: Error about removing/adding shape that isn't or already is in space.

    keepee

    Thanks, it was a typo on my part. I'm surprised that C2 didn't complain about that one.

    Prominent mattb

    Using the custom movement behavior isn't ideal for that sort of thing. Attached is a way to find the point on the edge of a shape. toggle between events 3 and 4.

    Event 3 uses the contact depth and normal to find the point on the edge, which works for other object's corners, but not the current object's corners. Not much can be done there as it's how the library works.

    Event 4 uses the query from point condition to find the closest point on the edge. This probably won't work the way you want with tilemaps though.

    Contact points are only accessible from under the "post collide" and "for each collision pair" conditions. So yeah you'd need to save the info to variables to use outside of that.

    A segment query from the object's center to the contact point may be one solution.