x


using left right keys to turn

I have MouseLook working fine. I'd like to add the 'left' and 'right' arrow keys to TURN my camera (rather than strafe it). Having trouble mapping input to such. Tried adding left and right to the MouseX and Horizontal inputs, did nothing. What am I missing?

more ▼

asked Aug 24, 2010 at 05:21 AM

DaveA gravatar image

DaveA
33.5k 419 341 467

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You need to set up two new Inputs with Edit/Project Settings/Input. Call one Right and the other Left. Set the appropriate keys in the fields there, only setting the 'positive' ones. Type is 'key or mouse button'. In your script, check Input.GetButton("Left") (likewise Right) and add/subtract from rotation based on deltaTime.

more ▼

answered Aug 24, 2010 at 08:24 PM

DaveA gravatar image

DaveA
33.5k 419 341 467

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4932
x1600
x1452
x70
x64

asked: Aug 24, 2010 at 05:21 AM

Seen: 2869 times

Last Updated: Aug 24, 2010 at 05:21 AM