So, I basically was wondering if anybody could help me with making a code so that when I push and hold a particular key down, an object in the scene changes its rotation and position? Any help is appreciated :)
2 Answers
2I suggest having a go at it yourself because people here will not just make code for you when you please. This is for problems you are having when creating something in Unity, you should start by creating something then if you have a problem post a detailed question here. In the meantime take a look at unity script reference site for transforming an object http://unity3d.com/support/documentation/ScriptReference/Transform.html pay attention to transform.postition and transform.rotation (or eularAngles) and also http://unity3d.com/support/documentation/ScriptReference/Input.html for inputs.
Hi,
You'll find this answer and forum reply with fully working project maybe useful:
But, I have to agree with Bodaebob, have a go at it yourself first, this far more lucrative as a learning experience, then come up with question where you have problems in your code.
Bye,
Jean
well you shouldn't have said "I basically was wondering if anybody could help me with making a code" and not made an effort in the 1st place. If you have said "Does anyone know how I should go about ..." then I would have given the same answer but without the snappy comments.
– anon61858128