Prominent's Recent Forum Activity

  • ah, I just remembered I had this issue before and looked back through the thread and saw your post that helped me solve it:

    I re-added it to the new version at line 6548 and now things are working like before.

  • Hm, that makes sense. Thanks for the clarification.

    Yeah, I guess having an action to force an update to an object sounds like the most reasonable method from what you say.

  • Here's a capx showing the issue I'm having: http://1drv.ms/1OghVND

    I need a way to get the correct positions of the red sprites at the moment of collision, so that one red sprite would be overlapping the green sprite(collision point).

    If anyone can help, it would be appreciated.

    btw, I can't update the red sprites every tick, because I'm not referencing imagepoints- this is just a simplified demonstration of the issue. My other project uses a plugin that does calculations regarding the bounding poly of the sprite, and I don't want to run that every tick. So I need a way to get the position during the Post Collide.

  • I tried updating the the position of a sprite everytick, and the coordinate matched the sprite position of the physics object, but I still need way to get the data on the collision.

    For example, the contact point is always offset from the sprite. I need a way to get the correct position & angle of the sprite so that it lines up with the contact point. I'm not sure how to do this.

    This is unrelated to the depth of the collision.

  • R0J0hound , maybe I'm getting confused with something. When I try to get the position of a sprite on post collision, the coordinate doesn't appear to match up with where the sprite is located. The coordinate seems to be from the previous gamecycle.

    So based on this behavior, it seems the Post col. just references the previous gamecycle, even though the sprites are drawn in position with the current cycle?

    That makes it difficult if I need to get the position of the sprite in the current game cycle inside the Post Col.

    To summarize the problem: The collision data appears to be for the current game cycle, whereas the sprite data is from the previous gamecycle. So it becomes out of sync when trying to compare the two.

    edit: you can test this by make the game speed 0 on post collision to see the disconnect. The disconnect is larger, the faster objects move.

    edit: I just tried the pre-collision in the new update, and it has the same issue. I need to figure out a way to get the current sprite data during the collision events, because precision is important to what I'm trying to accomplish.

  • Tilemaps have an expression tilemap.positionToTileX(coordX)

    Another way to do it is floor(coordX/tilewidth)*tilewidth, assuming the tilemap is positioned at 0,0

  • I took a moment and managed to make the effect you're going for.

    here's the capx

    http://1drv.ms/1Ke6Oi7

  • suntank , you might be able to use the Canvas plugin by r0j0hound to change the pixel data of a sprite, but I haven't tried it so I'm not entirely sure. You would probably have to paste the object to the canvas, edit the pixel data, then use the getimageurl and load that into the sprite frame.

    I don't know how efficient it would be, since editing pixel data can be slow, but it might be a workaround depending upon the situation.

  • How many different types of collisions do you need? You could use a separate tilemap for each collisions type. You would just place the tiles on one tilemap that relate with a specific collision type, etc...

  • There is the Tilemap.positionToTileX(xcoordinate) and Tilemap.positionToTileY(ycoordinate) for retrieving the tile X and Y. And there is the Tilemap.tileAt(tilex,tiley) to get the ID. If the ID is -1, then no tile exists at that location.

    You can check if a point overlaps with a Tilemap in the system expressions, and use the point's coordinates to get the tileX,tileY , and then from those the ID. That way, you'll be able to check collisions based upon the tile ID.

  • If you go to the store page, there is a link on the left that says Your downloads. click that to find your license.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This was posted about previously:

    Apparently, one hour of play earns you 12 cents.

Prominent's avatar

Prominent

Member since 28 Apr, 2012

Twitter
Prominent has 9 followers

Trophy Case

  • 12-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Email Verified

Progress

15/44
How to earn trophies