0
\$\begingroup\$

I am making a 2D game and I am having trouble in setting up a sprite movement. Here is a picture for reference what I want to achieve:

enter image description here

Now car is moving forward (I have done that using road and car animations). And time after time a traffic light comes. It gets larger when car comes close to it. How can I do it in 2D. Because z-axis have no effect on it. My camera is set to orthographic.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Things don't get larger when they're closer when using an orthographic camera. You need to use a perspective camera, or apply a scaling transformation yourself. \$\endgroup\$
    – DMGregory
    Jun 25, 2019 at 22:32
  • \$\begingroup\$ @DMGregory I used perspective mode on camera. I placed my sprite on z-axis 30. But when I start decreasing z (move sprite towards camera) the sprite still don't scale. \$\endgroup\$ Jun 28, 2019 at 9:53

0

You must log in to answer this question.

Browse other questions tagged .