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 tyo8686 · Jan 25, 2012 at 02:46 PM · translatecamera-lookorbit

Translating key not working with smooth mouse orbit

I just posted a question about translating in a axis using the below code.

function Update () { if (Input.GetKeyDown("space")){ print("space key was pressed"); transform.Translate(Vector3(0,0,speed) * Time.deltaTime); } } However due to client demands, there is a smooth mouse orbit that disables the above code. I require a mouse orbit and translation component; both required by the client no compromise.

I wonder if there is a way to fuse both; Translate and Smooth Mouse Orbit.

Comment
Add comment · Show 5
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 syclamoth · Jan 25, 2012 at 02:51 PM 1
Share

Could you explain this a bit better? The mouse never goes away, under what circumstances should the 'translation' bit actually work?

avatar image tyo8686 · Jan 25, 2012 at 03:07 PM 0
Share

The client wants a camera to orbit a 3d model of a city. However he wanted to add a forward/backward function not zoo$$anonymous$$g however.

The smooth mouse orbit has been changed to respond to WASD keys. While the forward/backward function is set to another letters "I" and "O" to simulate zoom in and zoom out.

I am not sure if both scripts can function together. Using the arrow keys to orbit the model while using the Translation with I,O. All testing I have done has only proven that both cannot co-exist.

ONe their programmers has demonstrated how to do it but he is uncontactable at the moment so I am here for answers.

avatar image syclamoth · Jan 25, 2012 at 03:12 PM 0
Share

Well, I can't really think of any reason why you can't just move the pivot point with O and I, and move the camera with the mouse (or WASD, whatever). Think of it like a 3rd-person camera, but without the person.

avatar image tyo8686 · Jan 25, 2012 at 03:20 PM 0
Share

Now I am exploring moving the pivot, ut however is there a script to make it follow the orientation of the camera?

avatar image tyo8686 · Jan 25, 2012 at 03:40 PM 1
Share

I finally solved it... Thanks a lot syclamoth! $$anonymous$$aybe animating the pivot was the trick!

0 Replies

· Add your reply
  • Sort: 

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Camera orbit around clicked position 0 Answers

Enable the OrbitCam script how can I make it will continue from the current camera view and position ? 0 Answers

Orbit Sim without Physics Engine 1 Answer

Mouse/Wacom stylus drag not working. 1 Answer

Move object from A to B around Zero 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