sullamul1a Posted March 25, 2016 Share Posted March 25, 2016 Hello, I'm experiencing weird behavior positioning a PIXI.mesh.Rope object using Canvas renderer (PIXI v.3.0.10). I put the rope object in a new container and position the container to a fixed point. Now, whenever I change the Pixel ratio (chrome dev tools) and reload the game, the Rope object inside the container moves around to a different location. The position of both the container and the rope object are still the same (debugged it), but visually the rope object inside the container is not in the same place. Secondly, applying width and height to the rope object will not change anything using Canvas renderer. can anyone please confirm that they have the same issues, or maybe suggest something that could cause this behavior. again, all of this does not occur using WebGL renderer thanks. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2016 Share Posted March 25, 2016 Canvas Mesh renderer has some problems regarding resolution. Can you please try https://dl.dropboxusercontent.com/u/46636530/pixijs/meshresolution/pixi.js ? If it works for you, i'll make a PR Quote Link to comment Share on other sites More sharing options...
sullamul1a Posted March 25, 2016 Author Share Posted March 25, 2016 Hey, thanks for the ultra fast reply, I tried it, sadly did not fix it for me. funny thing is that it seemed to make the rope object sift a little bit less, when changing ratios. thanks anyway! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2016 Share Posted March 25, 2016 what do you mean thanks anyway? im going to fix it again and you're gonna try Quote Link to comment Share on other sites More sharing options...
sullamul1a Posted March 25, 2016 Author Share Posted March 25, 2016 ok Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2016 Share Posted March 25, 2016 Ok i'll try to debug it on local example Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2016 Share Posted March 25, 2016 Ok, fixed, try the same file, and then i'll make PR: https://dl.dropboxusercontent.com/u/46636530/pixijs/meshresolution/pixi.js UPD: PR: https://github.com/pixijs/pixi.js/pull/2412 sullamul1a 1 Quote Link to comment Share on other sites More sharing options...
sullamul1a Posted March 25, 2016 Author Share Posted March 25, 2016 Now I am able to set the width and height of the Rope objec accordingly, the size is consistent between different pixel ratios. Thank you very much, now I can move on with my project. Also for the sake of awareness, i noticed that when I apply an anchor point to the container, the Rope object does not inherit it, the container gets shifted according to the anchor point, but the child stays put. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2016 Share Posted March 25, 2016 There's no "anchor" in container, but there is "pivot" which is in pixels. All because width and height of container is not easy to determine, and better to write the offset in pixels. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.