SpriteComponent width and height


#1

Hi,

I can set the size (width/height) of a SpriteComponent with a tiled texture in the editor, see screenshot bellow:

image

But those properties are not copied when cloning the component. I have to manually set width and height on the SpriteComponent because they are reset to 1 on the cloned component.

Also the documentation does not talk about those properties at all: https://developer.playcanvas.com/en/api/pc.SpriteComponent.html

But my main issue here is that on some Android devices (Galaxy S9, Android 9), the sprite does not repeat correctly, specially when zooming and moving the camera, the upper part of the sprite moves faster:

Android:

Chrome Windows:


#2

Posting for future reference, the first issue you mention (cloning the entity doesn’t retain sizing) seems to be resolved.

I’ve raised an issue to the GitHub repo for adding the width/height properties to the documentation for the sprite component.

If you are still experiencing issues with sprites rendering could you post a sample project.


#3

Hey, thanks for your answer.

Maybe it’s resolved. I ended up using a plane with a tiled material instead of a sprite.