caymanbruce Posted April 16, 2017 Share Posted April 16, 2017 Hi everyone sorry for the "tongue-twisted" title. I am making a player sprite inside a container and it works like this: when I move my player sprite on some occasions such as the sprite touches some other sprites on the container, the container scales smaller but the player sprite will scale bigger. However what I get for now is the player sprite will scale with its container. If the container becomes smaller the player sprite will become smaller too. Whatever scale I use on the sprite is useless. Is there anything I can do to change to what I want? Do I need to move the player sprite out of the container? If I do this their relative positions are hard to observe. Can somebody point out a direction for me please? Quote Link to comment Share on other sites More sharing options...
Taz Posted April 16, 2017 Share Posted April 16, 2017 The sprite's scale isn't useless. Both scales are applied. So for instance if you set the container's scale to 0.5 and set the sprite's scale to 2, then the sprite will maintain its size. And if you wanted the sprite to be 3 times its original size, then you'd set its scale to 6 (since 3 / 0.5 = 6 ). Quote Link to comment Share on other sites More sharing options...
caymanbruce Posted April 17, 2017 Author Share Posted April 17, 2017 11 hours ago, Taz said: The sprite's scale isn't useless. Both scales are applied. So for instance if you set the container's scale to 0.5 and set the sprite's scale to 2, then the sprite will maintain its size. And if you wanted the sprite to be 3 times its original size, then you'd set its scale to 6 (since 3 / 0.5 = 6 ). This works! Thank you. Now my problem is that the texture becomes a bigger ugly pixelated texture after scaling like I said in another thread. 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.