johnsbro

Members
  • Content count

    10
  • Joined

  • Last visited

  1. That makes sense, thank you!
  2. Sorry, I should've explained more, but I've figured out how to fix it! Using "false" helped but then I had to change the size. When using "true" I had to set the size as 256 otherwise there were huge gaps between the tiles, so changing it to 512 fixed the rendering issue. In the previous pic only half of the tile was shown, which was the issue that I didn't explain. I still don't quite understand what the animX and animY parameters are for in the addFrame() function. I've tried it with and without them and I don't notice a difference - am I supposed to be using them?
  3. tilemap.width = (renderer.width + 2*tilemap._margin) * scale; tilemap.height = (renderer.height + 2*tilemap._margin) * scale; tilemap.scale.x *= scale tilemap.scale.y *= scale This is what I'm trying at the moment. I'm trying to scale the tilemap directly rather than the entire stage, but the only visible difference between `tilemap.scale.x *= scale` and `stage.scale.x *= scale` is that when I scale the stage I'm left with the encroaching visibility frame you saw in the after pic. Also, this is what I get when I use "false" instead of "true" in the tilemap:
  4. Yes, the third parameter is true. These tiles are 512x512, is the size an issue?
  5. Here is the after pic, it was too large for the initial post. You can see how the top left sidewalk tile has been "scaled" up to the top left a bit, but it looks more like you have a deck of cards laid out next to each other and you push them together until they start overlapping each other. Overall they take up less surface area, but it isn't true scaling/zooming. I'm not sure what's causing this, and it happens regardless of if I'm setting the width/height or the scale. Any ideas?
  6. I'm trying to get my tilemap to scale and I'm basically following the example here: https://github.com/pixijs/pixi-tilemap/blob/master/demo/main.js#L17 However, what ends up happening is the tilemap itself will scale but the frames won't. I can't record a GIF because for some reason the screen randomly flashes white when running the PIXI app, but here are some screenshots which may be helpful:
  7. I'm multiplying the scale by 1/2 each time to shrink it. It's the same as "below.scale.x = below.scale.x * .5"
  8. This is in the game loop: ``` below.scale.x *= .5 below.scale.y *= .5 for (let i = 0; i < below.children.length; i++){ Body.scale(map, below.scale.x, below.scale.y, { x: 0, y: 0 }) } ``` below is a PIXI container and map is an array of Matter bodies
  9. Yes. but with that method the bodies scale in on themselves. I even tried "Body.scale(body, scaleFactorX, scaleFactorY, {x: 0, y: 0 } )" so that it would match up but that didn't work either.
  10. I'm using Matter.js as my physics engine and Pixi as my renderer and under normal circumstances I've been able to get them to work smoothly. However, I'm trying to do something where all of the objects *except* the player character are scaled down to look like the character is now above them. The scaling works visually in Pixi, but I can't get the bodies from Matter.js to go with it, so there are these "ghost objects" that I can't see but if collide with them then the scaled down objects will be moved. Does anyone have any tips for how to resolve this? Let me know if I need to post a gif if that would help explain the problem.