How could i go about creating a custom camera script in Unity?

Started by
1 comment, last by nullbear 10 years, 10 months ago

I'm a little new to scripting, a general explanation of the functions i would need to use and/or a finished script with comments and outlines i could walk through myself would be useful (im not asking for free scripts, i'd probably edit and customize any if i got one to my tastes anyways.)

What i want is probably easiest explained using pictures. So here we go, crappy arts:

http://imageshack.us/a/img607/2549/75029023.png (site doesnt allow .png images? thats unhelpful.)


Woah, that turned out worse than i thought. xD anyways, the camera would roll backwards and look up when the mouse was moved until a certain point, and would roll forwards looking down, rather than just rotating to see more, it would move, more closely simulating a persons head when they look up or down, how could i accomplish this without using built in packages and scripts?

I'f this isn't very clear tell me what i should clarify so that its easier to understand. thanks ^u^

-nullie

~Nullie
Advertisement

Hi Based on what i see on your image is that you want an FPC (First Person Camera) view?

actually you don't need a script to do that just create a First Person Controller and put it in your Game Object (Character).

the only thing is that you need to do is create a script that can move that camera with it (X,Y)

i've linked a website on how to create a first person view

i hope i've answered you question :D

http://docs.unity3d.com/Documentation/Manual/HOWTO-FirstPersonWalkthrough.html


i actually wanted it so that the camera would roll back, rather than just rotate upwards, but someone else already suggested parenting it to an object, and having it rotate off center, this would have the effect i was aiming for. The link is more helpful than they were though, thanks ^^

~Nullie

This topic is closed to new replies.

Advertisement