-2
\$\begingroup\$

Roll a cube in 1 direction Hi, I want to move a cube just to the front when the screen is taped in my Unity 2D project. I have seen some codes about this but I just need to move it in one direction (front).
Can someone help me? enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ "in my Unity 2D" I'm confused. A cube is 3d. Why not animate it in your 3d modelling software and export the animation? \$\endgroup\$ – Vaillancourt Sep 30 '18 at 1:18
  • 3
    \$\begingroup\$ "I have seen some codes about this" cool — have you tried using them or adapting them to what you need? Show us what you've tried and describe where it's going wrong and we can help you fix the issue. \$\endgroup\$ – DMGregory Sep 30 '18 at 13:07
1
\$\begingroup\$

Find vertex with lowest height and rotate whole cube around that point.

\$\endgroup\$
  • \$\begingroup\$ Much easier to just animate it in a 3D package IMO. Also less computation and more predictable results. \$\endgroup\$ – eclmist Sep 30 '18 at 17:35

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.