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 /
This question was closed Aug 17, 2013 at 08:38 AM by Fattie for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by LeftyTwoGuns · Aug 16, 2013 at 11:36 PM · rotationblenderaxes

Getting barrel to correctly aim at object

I have a turret that rotates on its X-axis in both Blender and Unity. But constraining its LookRotation on the Z-axis is the only way I've gotten it to rotate the way I want it to in Unity.

Despite correctly rotating on the Z-axis, the barrel itself doesn't aim at the objects, I think the center of the pivot point is what's actually looking at the objects. I'm new to both Blender and Unity but I think this is mainly a Unity problem. With Unity and Blender both doing axes differently, I'm incredibly confused. What do I have to do in Blender to ensure that the tip of the barrel is what's actually looking at objects in Unity?

Comment
Add comment · Show 2
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 Lovrenc · Aug 16, 2013 at 11:49 PM 0
Share

Picture tells more than a 1000 words.

avatar image robertbu · Aug 17, 2013 at 12:07 AM 1
Share

I cannot help you with Blender, but it is easy to see how it is positioned and rotated in Unity. Put a small object at the origin. Typically I use a sphere sized to (.1, .1, .1). Bring in your gun and place it at the origin. Both object should have a rotation of (0,0,0). In this configuration, the pivot for the gun should be at the the object at the origin. The barrel should be pointed at positive 'Z'.

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by LeftyTwoGuns · Aug 17, 2013 at 01:18 AM

I think I got it. My turret is just a simple place holder model, with one cylinder rotated 90 degrees on the Y axis in Blender, and another cylinder (the barrel) placed on top of it upwards a long the Z-axis and joined together as one object. The barrel was pointed in the right direction but the cylinder wasn't (which I obviously couldn't tell because it's a cylinder). What fixed it was rotating the base cylinder by 90 degrees, but then using Apply Rotation to reset it's transform rotation back to (0, 0, 0). Which made both the rotating cylinder and the barrel facing the same direction.

Blender to Unity seems pretty quirky : \

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 Fattie · Aug 17, 2013 at 08:38 AM 1
Share

You should also check out "LookAt" which is used constantly in Unity and very handy

Follow this Question

Answers Answers and Comments

18 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

Related Questions

Blender > Unity - help with unwanted bone twisting/rotation? 0 Answers

Aligning an object's rotation direction to a vector 2 Answers

Inverse Rotation in Child Object 1 Answer

Blender imported model textures has wrong rotations and repeats 2 Answers

Blender Animations with Different Starting Rotations 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