Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Averlion · Jun 21, 2010 at 06:14 PM · camerarotatesmoothfollow

Space Game Camera

Hi everyone.

I try to make the smooth follow camera rotate with my spaceship. when i press "e" or "q" my ship rotates around the x axis when you look from behind to the ship. But the Camera didnt rotate. I used the normal smoothfollow script but cause i am very new i understand nearly nothing from it. Hope someone can help. Sry for my english.

Thanks Averlion

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

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Pirate___man · Jun 21, 2010 at 06:23 PM

I don't get your question very well but i'll try to answer it.

Here is another smooth follow script specifically designed for spaceship games (Javascript):

var target : Transform; var distance = 3.0; var height = 3.0; var damping = 5.0; var smoothRotation = true; var rotationDamping = 10.0;

function Update () { var wantedPosition = target.TransformPoint(0, height, -distance); transform.position = Vector3.Lerp (transform.position, wantedPosition, Time.deltaTime * damping);

 if (smoothRotation) {
     var wantedRotation = Quaternion.LookRotation(target.position - transform.position, target.up);
     transform.rotation = Quaternion.Slerp (transform.rotation, wantedRotation, Time.deltaTime * rotationDamping);
 }

 else transform.LookAt (target, target.up);

}

But if you trying to make the camera just follow and rotate you could just move the camera to the location you want and then make it the child of the mesh. Hopefully that helps!!!!

Comment
Add comment · Show 3 · 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
avatar image Averlion · Jun 21, 2010 at 06:26 PM 0
Share

Thanks a lot. That is what i wanted ^^

avatar image Pirate___man · Jun 21, 2010 at 06:32 PM 0
Share

Which answer helped?

avatar image Averlion · Jun 21, 2010 at 06:36 PM 0
Share

The script was what i was searching for.

avatar image
0

Answer by smoketh · Sep 15, 2012 at 12:42 AM

Its jiggling as hell. Here take a look. http://beast-rage-games.tk/WebPlayer/WebPlayer.html Controls - arrows + xc for roll, a/z - increase/decrease speed, f - afterburner.

Comment
Add comment · Show 1 · 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
avatar image williamfmc · Oct 21, 2012 at 12:49 AM 1
Share

It was also jiggling for me. I fixed it by modifying my movement script. Just added "Time.deltaTime" and increased my movement speed.

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

2 People are following this question.

avatar image avatar image

Related Questions

Set camera angle in a script using the same system as the properties page?? 0 Answers

Zoom in on object and make other objects disappear on zoom?,Zoom in on object and make other objects disappear 0 Answers

Changing target of SmoothFollow camera 2 Answers

Camera rotate with mouse in TPC 0 Answers

SmoothFollow script issue for multiplayer car game 0 Answers


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