Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by AlexFormoso · Sep 17, 2011 at 07:12 PM · cameraplatformersidescroller

Camera problems in SideScrolling

Ok first of all, lets get this clear, im a total noob with just 1 week working on this. What im trying to accomplish is some kind of Teenage Mutant Ninja Turtles (TMNT) kind of game, but with 3D models, and, not a brawler game, a shooter instead. First of all, this youtube video explains very well what im trying to make: http://www.youtube.com/watch?v=5XIdm22lPUc ... Amazing huh? , now add shotguns , assault rifles and tanks to that and we got something.

My problem with that is the camera, i dont know how they dame that one up (elevation from the platform, angle of inclination, separation from the platform). After many tries, i've come up with this: http://imageshack.us/photo/my-images/64/screenshot1rx.jpg/

But in the edges im still unable to simulate the camera style in the video. Im looking for someone experienced in this camera style to calibrate the Angle of the camera in the Z Axis (asuming the player is moving on the X and Z axis and Jumping in the Y axis), also elevation and distance from platform.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Clunk · Sep 19, 2011 at 05:51 PM

Attach this to you camera. Make sure the object you want it to follow is Tagged as "Player". After you attach this script to the camera, you need to select the cam and set the "Offset" variable in the inspector.

var cam_offset : Vector3;

private var player : GameObject;

function Start()

{

 player = gameObject.FindGameObjectWithTag("Player");

}

function Update()

{

  transform.position = player.transform.position + cam_offset;

  transform.LookAt(player.transform);

}

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

2.5D Platformer Camera follow character Y axis but not for every jump? 1 Answer

Cursor on animated camera. 0 Answers

Unity 2D camera and lighting issues 2 Answers

2D camera that tracks player after running short distance 1 Answer

Making a 2D platformer not go backwards. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges