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 /
  • Help Room /
avatar image
0
Question by MerlinsMaster · Jan 21, 2016 at 02:04 AM · rotationpivot

game object not rotating on its pivot

Hey Guys,

I have a spaceship in my game that flies around on the XZ plane in the scene(the Y position, X rotation, and Z rotation of the rigidbody are frozen in the Inspector). The ship rotates via AddTorque.

The problem I'm having is that it's not rotating around the pivot point near the center, but around the very back of the ship, making it look as if it's being swung around(there is no pivot point in this location). Has anyone else had a problem like this? Is there a solution?

I should mention that I've got the two buttons at the top set to "pivot" and "local"(I was going to post a screen cap, but I kept getting a parsing error when trying to do so).

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
0

Answer by Eric5h5 · Jan 21, 2016 at 02:50 AM

In the editor you can switch between pivot and center by clicking the appropriate button, but the pivot when using code is where the actual pivot point for the model is. You'd need to fix the model.

Comment
Add comment · Show 2 · 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 MerlinsMaster · Jan 21, 2016 at 03:45 AM 0
Share

No, that's what I was trying to clarify, is that the pivot is near the center of the model where I intended it to be. There is no pivot point where it is rotating from, in either the top empty game object or the actual model below it.

avatar image Eric5h5 MerlinsMaster · Jan 21, 2016 at 04:16 AM 0
Share

The pivot is at (0, 0, 0). $$anonymous$$ove the model (in your modeling app) so the pivot point is where you want it. You can play around with moving the model relative to an empty (which is the parent of the model) and rotate the empty, but it's easier in the long run just to fix the model.

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

36 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

World Rotation Around The Player Lead me to a Strange Result! 0 Answers

Character Shooting Mechanic 2D Issues 0 Answers

Getting a pivoted look at in 2D 2 Answers

Set Rotation of GameObject 1 Answer

Rotate 2D pivot so that gun points at target. 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