- Home /
Cube Moving as Player
Hi
I want to create a cube as a player, and for it to flip with the arrow keys up, down, left right.
How can I do this? Can I just use a cube created in unity or do I need to animate those movements in Maya and then import it?
Similar to this movement: http://www.miniclip.com/games/bloxorz/en/
Thanks
Answer by WillTAtl · Nov 01, 2011 at 06:32 AM
If it is a true cube with same-length edges, the same texture on all faces, AND the texture is symmetrical on both axes, doing it in maya will likely be easiest and most efficient. You could do a single animation of it flipping forward, and just set the rotation of the object to face the direction of movement before playing the animation, then update the position after the animation finishes.
If one or more of those three conditions are not true, it would be tricky to do it in maya, and you'll probably want to do it dynamically. This question is about how to do that specifically, and includes an explanation as well as example code in js. http://answers.unity3d.com/questions/144830/how-to-rotate-around-object-axis.html
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Return Proper Velocity of Player object 3 Answers
A simple solution for constant rigidbody movement without changing and clamping velocity directly 2 Answers
Player Controller moves automatically forward. cant stop. 1 Answer
How do I set up my players controller script (How do I change the controls used to move and look) 2 Answers