1
\$\begingroup\$

Prefix: I am NOT trying to rotate a sprite 90 degrees by it's transform, this changes what is up/down and forward/backwards for the object. I need the sprite displayed on the X-Z plane in comparison to the default X-Y plane in it's natural state in the game world with rotation transforms of 0.

I'm trying to use 2D sprites on the X-Z plane, how do I go about either modifying the built in sprite renderer to do this, or creating my own custom sprite renderer component?

\$\endgroup\$
1
\$\begingroup\$

You need to do this as a hierarchy. Have a main Object that you move and run all your code on, and then add the sprite as a child object and rotate the sprite object only so it aligns the way you want it to.

\$\endgroup\$
  • \$\begingroup\$ I cannot rotate the sprites or objects in any way, shape, or form. They must be in scene with (0,X,0) rotation in reference to the game world. This is necessary for steering behavior, which does not play well when objects are at a 90 degree rotation an anything other than the Y axis. I'm looking for a way to either modify the sprite renderer to display the sprites on the X-Z plane, or recreate it's behavior in some other way. \$\endgroup\$ – Douglas Gaskell Apr 6 '15 at 2:29
  • \$\begingroup\$ I think I see what you mean now, I was trying to get that to work somehow then it struck me. Just have the sprite renderer itself be the child, nothing else. And it works fine. \$\endgroup\$ – Douglas Gaskell Apr 6 '15 at 6:04
  • \$\begingroup\$ If this answered your question please mark it as the answer. Thanks! \$\endgroup\$ – Anthony Nichols Apr 6 '15 at 14:44

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.