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 Morden · Sep 02, 2014 at 05:14 AM · vector math

Vector math: When forward,up,and right are certain values, a part of my model is at (0,1,0). How do I calculate that?

I know that when my object is sitting in a certain way, a specific part is on the (0,1,0) vector. I know what all 3 transform vectors (forward, right, and up) are at that given time. Knowing these 4 vectors at that specific time, it seems to me that I should be able to do some sort of vector math such that I can determine the vector for that specific part at any given time. So if I draw a ray during Update, I can have it ALWAYS pass through the specific point on my model (ignoring rounding errors). But I can't work it out.

Is it possible, or is there some sort of flaw in my logic?

For specifics, I know that when the three axes are:

forward: (0.873,-0.333,0.356)

right: (-0.172,0.471,0.865)

up: (-0.456,-0.816,0.354)

the vector I need to aim down is (0, 1, 0).

Comment
Add comment · Show 3
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 rutter · Sep 02, 2014 at 05:13 AM 0
Share

How do you know which point you need to connect to?

At a glance, it seems to me that TransformPoint might be the way to go. You could use it to build a Ray that begins at the pivot point and travels through your target.

avatar image Morden · Sep 02, 2014 at 05:36 AM 0
Share

I just know by looking at the model. The particular example I am using is a 4-sided die. When the die sits flat on one side, a particular corner is straight up.

I had a really long comment about not knowing what to transform by and that maybe my problem was working in world space ins$$anonymous$$d of object space. Then I looked up doing that conversion and realized that's what TransformPoint was for. I'll look into using that and see what I come up with.

avatar image Morden · Sep 02, 2014 at 06:05 AM 0
Share

That did it, thanks. $$anonymous$$y ray is now firing out exactly where it is supposed to, regardless of the object orientation.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How do i reflect a rotation 1 Answer

How to visualize Vector math in Unity? 1 Answer

Surface Shader apply normal map to object normal without pluggin it into o.Normal 1 Answer

Best Practice for rotating a Vector3, x degrees? 1 Answer

Predict Vector after AngularVelocity applies 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