x


Camera movment

I need move the camera to right and left while the character is moving,like its head is moving to left and right ... can help me?

EXAMPLE: http://www.youtube.com/watch?v=yWRrmv2bz4w

Thz!

more ▼

asked Jun 01 '11 at 07:52 PM

saperle gravatar image

saperle
16 1 2 3

Do you want to do it automatically or under joystick or mouse control? I think it would not be a good idea the camera doing this automatically, because you would face a lot of trouble - looking to the wrong side when an enemy is approaching, how to look to the right direction when the character stops etc. - not to mention a seasick sensation after some time playing...

Jun 01 '11 at 11:48 PM aldonaletto

I wanna simulate walking camera, when i press W for example and move fordward, the camera move left and right ... srry for my english :D

Jun 02 '11 at 08:47 AM saperle

Are you making a 2d game then? You could trying making the camera a child to the player?

Jun 02 '11 at 12:56 PM CarlLawl

No!, look: http://www.youtube.com/watch?v=yWRrmv2bz4w ... i wanna make this camera effect

Jun 02 '11 at 05:00 PM saperle
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Oh i get what you want to do now alright you still make the camera a child of the actor and you still employ some sort of mouselook script

however what you can do is in the script you have governing movement you set it up something like this

when moving broadcast message shake, on your camera you put a script that starts with a function named shake, and what it does is rotate the cameras local position a few degrees in either direction in the x (i think you might have to study up on quarternons in order to make smooth rotations)

how it should work is when the character is moving its broadcasting a msg that triggers this shake script throw in some Random.Range functions to make it more dynamic

more ▼

answered Jun 02 '11 at 05:59 PM

lil_billy gravatar image

lil_billy
358 8 12 21

(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:

x2978
x20

asked: Jun 01 '11 at 07:52 PM

Seen: 453 times

Last Updated: Jun 02 '11 at 06:06 PM