R0J0hound's Recent Forum Activity

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 1

    The cursor object only has the spring joint so only that gets destroyed. The pin joints are connected to the sprite object which isn't connected to the cursor object.

    2

    That event is to demonstrate joint breaking. With the event enabled pull one of the balls down. When you pull far enough the impulse on the joint will get too large and the joint will be destroyed so the ball will break free