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
3
Question by azmilarash96 · Apr 22, 2011 at 12:27 PM · scriptingbasicsvector

What is Vector3, Vector4, etc.?

found in visual c# scripting. :/

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

2 Replies

· Add your reply
  • Sort: 
avatar image
17
Best Answer

Answer by PaxNemesis · Apr 22, 2011 at 12:38 PM

It is basicly an array of 3(Vector 3) and 4(Vector 4) float values. Vector3 is usually used in 3d space for X,Y and Z values. Vector4 is usually used in shaders for R(ed),G(reen),B(lue),A(lpha) values.

Hope it helps ;)

Comment
Add comment · Show 6 · 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 zmar0519 · Apr 22, 2011 at 12:43 PM 0
Share

Great explination, PaxNemesis!!! :)

avatar image azmilarash96 · Apr 22, 2011 at 01:18 PM 0
Share

thanks, it helps my understanding! :)

avatar image EpicTwist · Apr 22, 2011 at 02:13 PM 0
Share

So, the shadows are vector 4 or something?

avatar image DanielDude · May 13, 2011 at 07:00 PM 0
Share

But colors aren't vectors! ??

avatar image PaxNemesis · Sep 19, 2011 at 03:07 PM 2
Share

$$anonymous$$Dude: colors are number values from 0-255 or 0-1 and in combination creates most colors we can see. As there are 3 primary colors this can be added to an array: Vector3(0.5f, 0, 1.0f) (Red, Green, Blue) <- This represent Purple.

Show more comments
avatar image
2

Answer by emalb · Dec 16, 2013 at 02:45 PM

There's a good tutorial video about Vector Maths here.

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 Bunny83 · Dec 16, 2013 at 03:11 PM 1
Share

+1

Yes, the video is really great (and a bit funny), however the last example (cross product) is badly choosen. A tank gun-turret is usually made up of different components. Rotating it around the calculated crossproduct, if the new target is higher or lower, would tilt the turret strangely. You usually rotate the turret-base around the tanks up vector and the barrel around the turrets right vector.

Other than that really well done

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

need particle help 1 Answer

How to flip the card(in guiTexture) 2 Answers

What is setter and getters??,What is setter and getters 3 Answers

Random trivia question 1 Answer

Script error about the semicolon. 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