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 Gianluca88 · Aug 29, 2014 at 04:16 PM · vector3vectorcoordinates

How to change Point of Application of a vector?

Hi all, As you know, in Unity we can create vector in 3D, using vector3. If I write new vector3(2f,2f,0f) I create a vector that start from origin (0f,0f,0f) and end to (2f,2f,0f) coordinates. I don't want that my vector start from origin, I want start it from (2f,0f,0f) and end to (2f,2f,0f). Is it possible?? Thank you

Comment
Add comment · Show 4
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 AyAMrau · Aug 29, 2014 at 04:35 PM 2
Share

It's not exactly true that the vector starts at (0f, 0f, 0f), a Vector only has a magnitude and direction, which is described in the terms of (x,y,z) in case of Vector3. Once you apply it to something with a position it will act relative to that position.

In your example you are just talking about a vector (0,2,0), just it would be applied at (2,0,0).

Therefore it would be helpful if you described what are you actually trying to achieve.

avatar image Gianluca88 · Aug 29, 2014 at 04:40 PM 0
Share

Hi, I have to descrive the centre of Pressure (COP) of a foot. I have 2 Pressure sensors on a foot and I can misure 2 vertical Forces. $$anonymous$$y goal is calculate COP of the foot and have magnitude, angle of the vector applyed to the COP.

Edit1) the 2 forces has different module due to the baricenter position of the human body.

avatar image robertbu · Aug 29, 2014 at 04:51 PM 0
Share

You need to distinguish between line segments, rays, and vectors. Line segments have two positions. Rays have a position and direction (and can constructed and manipulated using Unity's Ray class). Vectors have direction and magnitude.

Not sure what you need, but you can add and subtract vectors. So if you want a Vector for what you describe:

  Vector3 dir = Vector3(2f,2f,0f) - Vector3(2f,0f,0f);
avatar image Gianluca88 · Aug 29, 2014 at 05:18 PM 0
Share

I try this solution but Vector dir become (0f,2f,0f), ins$$anonymous$$d I want (2f,2f,0f)

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by flaviusxvii · Aug 29, 2014 at 04:46 PM

You are describing a line segment in 3D space, from 2,0,0 to 2,2,0. You'd use two Vector3's to track this information, each point being stored relative to the origin. If you later want to know how these two points in space relate to eachother you can subtract one from the other to get the Vector3 between them.

I'd suggest reading up on Linear Algebra to get a sense of http://en.wikipedia.org/wiki/Basis_(linear_algebra)

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 Gianluca88 · Aug 29, 2014 at 05:21 PM 0
Share

$$anonymous$$aybe now the problem is more clear. I don't have to understund vector3 like a Force, isn't true?

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

24 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

Related Questions

Getting (Input) values before running rest of script. 0 Answers

Why does the time in Vector3.Lerp effect my position? 1 Answer

[HELP] Translating vector 2 co-ordinates to real space 1 Answer

Need very specific help with Quaternions 1 Answer

Move Forward Locally While Still having Collision 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