- Home /
Tank Turret move on XAxis by Mouse XAxis
i am on day 4 of using Unity/Blender, i copy and paste a lot from tutorial on youtube
my game so far http://www.filehosting.org/file/details/417047/50zVAEimUmy70kkx/Game-Poulpc.rar
i have try using the script form this video http://youtu.be/ypSkxGRY218?t=6m17s but i have more the one camera
only one the came close was this one
var rotationSpeed = 100.0;
function Update () {
var zdir = Input.GetAxis("Mouse X");
transform.Rotate(zdir * rotationSpeed * Time.deltaTime, 0, 0);
}
but that moves the turret up and down, not left and right
looked a loot on this page to, but most use keys to move it or MouseDrag or ray
only thing i am looking for is a script that i can put on my turret that makes it move, right and left when i move my mouse right and left
or and noob tutorial
Answer by Poulpc · Feb 03, 2013 at 03:53 AM
i made it work, i made a cude put the script on it flip it 90 on ZAxis and put my tank top in it, and than put all back ind to my tank
now i only need to find some limit script
Your answer
Follow this Question
Related Questions
Moving an Object from Point A to Point B by the Drag Method 0 Answers
MouseLook restrictions not working 1 Answer
Easy Animation/Modeling question 2 Answers
Lock rotation of object 4 Answers
Rotate on Z axis 2 Answers