• 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 Aubrey Hesselgren · Aug 16, 2010 at 02:34 PM · vector3projectplaneexclude

What is Vector3.Exclude for?

I can't seem to find any documentation for "Vector3.Exclude()"

Is it the same as projecting one vector onto another... i.e.

public static Vector3 ProjectOntoPlane( Vector3 vec, Vector3 planeNormal )
{
    return vec - Vector3.Dot(vec, planeNormal) * planeNormal;
}

In which case, can I lose this Util function? :)

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
2
Best Answer

Answer by Wolfram · Aug 16, 2010 at 02:58 PM

Google is your friend - try it ;-)

I found some reference on the russian unity3d site. The code shown there says "yes, it does exactly what you said, except a) the two parameters are reversed, b) the "planeNormal" (which can be any vector) doesn't have to be normalized."

Where did you find the info that there is a function called Vector3.Exclude() in the first place?

Comment
Add comment · Show 4 · 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 Aubrey Hesselgren · Aug 16, 2010 at 03:03 PM 0
Share

Intellisense picked it up when I hit "Vector3.". Was just curious. The project vector call is somewhat standard, but always seems to have a different name in different engines.

I swear I googled it! :). Not hard enough, I guess!

avatar image Aubrey Hesselgren · Aug 16, 2010 at 03:07 PM 0
Share

Whoa, that site has internal listings of the code. Very helpful clarification, but I'm guessing it's reverse engineered? Is it immoral to look there? :)

http://unity3d.ru/distribution/viewtopic.php?f=87&t=1834&st=0&sk=t&sd=a&hilit=string

avatar image Wolfram · Aug 16, 2010 at 04:02 PM 0
Share

"I swear I googled it! :). Not hard enough, I guess!" ok, I can believe that, because if you wrap your query in quotation marks, it will search for it as a single phrase, and it returned a single hit - to the site you posted. Uh, wait...now it's TWO hits...some iranian site joined it, referencing THIS page. $$anonymous$$ust be some bot...how weird is that? o_O

avatar image Aubrey Hesselgren · Aug 16, 2010 at 05:10 PM 0
Share

I HATE ROBORTS!!!

avatar image
0

Answer by LyleE · Feb 05, 2015 at 07:11 PM

Hi Aubrey! Fancy seeing you here.

Here in the future-times of v4.6, Exclude is deprecated in favour of (the now documented) Vector3.ProjectOnPlane - Note that the order of the parameters is swapped.

Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Rotating A Vector2 Input Into A Vector3 1 Answer

How to get the angle of the terrain under de front and back of my object 1 Answer

Imparting Physics in only certain planes of motion 1 Answer

Point on a Plane between two points 1 Answer

Math Question : How to Get a Point on a Ray which is EXACTLY 5 units away from Vector3.Zero? 5 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