Sign in to follow this  
nullbear

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

Recommended Posts

nullbear    253

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

Share this post


Link to post
Share on other sites
HyperV    1719

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


 

Share this post


Link to post
Share on other sites
nullbear    253

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 ^^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this