Answer the question
In order to leave comments, you need to log in
How to scale sprites with perspective shift?
Here, let's say
float centerX, centerY;
float offsetX, offsetY;
for (float i=0; i<10; i++){
scaleX=scaleY=i/10;
putSpr(centerY+offsetX*i, centerY+offsetY*i, scaleX, scaleY);
}
Answer the question
In order to leave comments, you need to log in
I would draw a top view on a piece of paper and in this 2D projection I would indicate not the center of the sprite and its width, but also the camera point at the bottom of the piece of paper. There, already in geometry, you can write a formula.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question