1
\$\begingroup\$

I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. That's when I set it to Awake. But as the object falls and the parallax is moving, how do I control these factor?

When the object falls by right the sprite should be updated to follow the dynamic body position. Let's say I have a character, to avoid the falling object, I move the parallax layer. The sprite is attached to the parallax layer. I'm asking what should I do in this case. Any advice?

\$\endgroup\$
  • 2
    \$\begingroup\$ I'm sorry, but I find your question hard to understand. Could you perhaps add a picture or an example? \$\endgroup\$ – Max Dohme Aug 13 '11 at 9:57
1
\$\begingroup\$

The object should be offset along with the parallax in addition to its movement within the layer.

When doing parallax rendering, the layers themself aren't actually moving, its just the viewport that changes. Anything on the same depth as a parallax layer should be moving along with it, and if it is moving, you should simply add that on top.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.