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
1
Question by spaceshooter · Dec 13, 2010 at 11:12 PM · rotationphysicskinematic

Rotating a Kinematic Object

I have a Kinematic object, being moved by transform.translate. I would like to have the object spin while it moves, without affecting the actual movement. AddTorque doesn't work for Kinematic and using transform.rotate() affects the path that the object takes. Any ideas? Thanks!

Note: I move the object with transform.Translate(Vector3.down * amtToMove); So I think I want to spin/rotate the object, without affecting where the axis points, if that makes sense.

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
2

Answer by 3dDude · Dec 13, 2010 at 11:20 PM

you have to use world space like so:

transform.Rotate(Vector3.up, Time.deltaTime, Space.World);

transform.rotate docs:

http://unity3d.com/support/documentation/ScriptReference/Transform.Rotate.html

hope this helps!

Comment
Add comment · Show 5 · 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 spaceshooter · Dec 13, 2010 at 11:25 PM 0
Share

Almost... Here is how I move the object: transform.Translate(Vector3.down * amtTo$$anonymous$$ove);

If I use your code, with Vector right, it will eventually cause the down axis to point up... is there anyway to spin on the Right axis?

avatar image 3dDude · Dec 13, 2010 at 11:31 PM 0
Share

yeah just change it to transform.Rotate(Vector3.right, Time.deltaTime, Space.World);

simple :)

avatar image spaceshooter · Dec 14, 2010 at 12:10 AM 0
Share

I did, the down axis moves due to the rotate, even if set Space.World. I'm thinking I need to make an empty GameObject and have it as its child, so I can move the Parent and spin the child.

avatar image 3dDude · Dec 14, 2010 at 12:55 AM 0
Share

hmm I'm not really sure what your saying... could you explain better?

avatar image spaceshooter · Dec 15, 2010 at 12:05 AM 0
Share

I created an empty GameObject and made the original object (which I wanted to spin) a child. Now I just move the parent (the Empty) and spin the child.

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

No one has followed this question yet.

Related Questions

Picking up physical objects 1 Answer

Make sphere rotate when controlled 7 Answers

Constant Force doesn't work 0 Answers

Does gravity affect kinematic objects? 2 Answers

Compute the torque needed to rotate an object at a constant rate 3 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