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 SuperPurpleByte · Sep 17, 2014 at 09:37 PM · rotationrocketorient

how to get an object to point the direction it is moving in unity

I have no idea where to start scriting, how would I get the rocket to orient its self to the direction it's moving?

https://www.youtube.com/watch?v=hhwcXJWYDFE&feature=youtu.be

Comment
Add comment · Show 1
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 Bluntweapon · Sep 17, 2014 at 09:47 PM 0
Share

The video is private.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Anxo · Sep 17, 2014 at 09:46 PM

If you apply a rigid body, you can check which direction it is moving by returning the rigidbody.velocity. If you want to face your object in that direction you can just say transform.forward = rigidbody.velocity.

But this question has been answered many times so please put in the effort and check before you ask.

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 Bluntweapon · Sep 17, 2014 at 09:49 PM 0
Share

And if he isn't using a rigidbody, he can just use transform.LookAt on the move operation.

avatar image SuperPurpleByte · Sep 17, 2014 at 10:34 PM 0
Share

Ok thanks, I hadn't thought about prior research, will next time

avatar image Anxo · Sep 18, 2014 at 07:47 PM 0
Share

Do not use answers to answer in the place of comments as people from the community will get emails and wont be happy. If your object is off by 90degreees you can do a few things, you can say transform.right = rigidbody.velocity, you can place the object as a child into another empty game object and then rotate it 90 degrees and attach the script to the parent ins$$anonymous$$d or if it is an imported object you can change the orientation in your 3d package and reimport it.

Also, if this satisfies your question, click the checkbox next to the answer to allow other people to know that this question was answered and no longer needs to be looked at unless you are searching for the answer.

avatar image
0

Answer by SuperPurpleByte · Sep 18, 2014 at 07:35 PM

What do I do if the rotation is off by 90 degrees?

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 thereadypunk · Mar 25, 2021 at 10:38 PM 0
Share

You subtract or add 90 degrees @SuperPurpleByte

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

26 People are following this question.

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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Rotating An Object On Its Axis Once 3 Answers

rotating an object only on z-axis help - c# 2 Answers

top down 3d camera rotation question 2 Answers

How to script a forever going swing? 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