hi in my game i need to achieve this:
when the player enters the teleporter he need to change is actual scale to zero, then when he is on the new teleporter the scale ,need to return to normal.
how can i achieve this
thanks
Add an instance variable on your player name "mcScale".
When enter portal:
is mcScale > 0 => substract 0.1 from mcScale
Set player scale to mcScale
And do reverse with getting out of portal.
the scale change is not working i don't see the sprite changing scale when i enter a teleporter.
Also i don't just want to go from 1 to 0 i want the scale to be animated not just 0/1 state.
Develop games in your browser. Powerful, performant & highly capable.
You can use LiteTween plugin. Tween to scale 0, move sprite to another teleport, reverse the tween.
the scale change is not working i don't see the sprite changing scale when i enter a teleporter. Also i don't just want to go from 1 to 0 i want the scale to be animated not just 0/1 state.
I didn't say that we scale from 1 to 0 instantly.
You can check it here:
portal-scaleplayer.netlify.com
Move left/right with arrow keys.