Rotate object in the direction of controller [SOLVED]

Hi,

I want to have a object rotate the direction the controller is pointing. So when i move the controller down, the object rotates to (faces) south, when i move the controller down and right, the object rotates to the south-east. Does anyone have any tips? Thanks!

It depends if you want to apply it to a rigidbody or not.
If you are using a rigidbody, try to use AddTorque. Otherwise use rotation in the transform.
Have a look at the scripting manual, you may or may not find examples for those methods.

Thanks! The problem i had was the -1 to 1 range of the controller. The rotating was working fine, pointing in the direction i mapped to the controller. But when the controller did nothing (0, 0 input), the rotation whent back to 0 degrees instead of holding the orientation.

It took me the whole weekend to get it working. I hacked the PlatformInputController script and now it works great!