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
2
Question by sparkzbarca · Nov 14, 2012 at 05:57 AM · physicsmath

Need a math geeks help. point at which a line hit a plane

So i know the equation of a plane.

Ax + By +Cz = D

Normal is the normal vector to the plane.

 A = normal.x
 B = normal.y
 C = normal.z

p1 and p2 are 2 points on the line (which will intercept a plane at some point)

 X = (p2.x - p1.x)* T + p1.x
 Y = (p2.y - p1.y)* T + p1.y 
 Z = (p2.z - p1.z)* T + p1.z 

I also know what D equals I solved for that by moving stuff around

The problem is a need a general solution for T.

It should be something like

 A ((p2.x - p1.x) * T + p1.x)) + B ((p2.y - p1.y) * T + p1.y)) + C ((p2.z - p1.z) * T + p1.z)) = D

At which point I need to isolate T But I cant see how to isolate T even if I expand it out.

Is there something i'm missing?

any help at all would be much appreciated.

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 sparkzbarca · Nov 14, 2012 at 06:53 AM 0
Share

oh wow... I wasted alot of time. :P

im thinking this is what your talking about?

http://docs.unity3d.com/Documentation/ScriptReference/Plane.Raycast.html

yea that seems to set the raycasthit you get back as having the point at which the plane intersects.

I actually checked mathf first and thought i was SOL.

avatar image sparkzbarca · Nov 14, 2012 at 06:55 AM 1
Share

Oh well, I did that once earlier already, I honestly spent hours basically figuring out how to rotate on a normal. How to find the normal and stuff, but I sure as hell understand alot more about vector math and stuff so its nice to be able to wrap my head around it and not just $$anonymous$$dless function calls. The function calls don't help after all if you dont know what function you need cause you dont know what they do.

Convert to answer if you want to be checked.

avatar image sparkzbarca · Nov 17, 2012 at 04:44 PM 0
Share

yea whoops thought i'd done so. Apparently i only gave the thumbs up

1 Reply

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

Answer by Fattie · Nov 14, 2012 at 06:28 AM

FTR you know PhysX will do this for you instantaneously right,

Documentation/ScriptReference/Plane.html

also
http://www.jtaylor1142001.net/calcjat/Solutions/VPlanes/VPtIntLPlane.htm
http://en.wikipedia.org/wiki/Line-plane_intersection

Also FYI the classic texts

http://www.amazon.co.uk/Mathematics-Game-Programming-Computer-Graphics/dp/1435458869

http://www.amazon.co.uk/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323

Finally - the stackexchange "math" site always results in incredibly quick answers to easy or hard arithmetic woes! nobody on here knows any math ;-)

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.

Follow this Question

Answers Answers and Comments

10 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

Related Questions

Collision impact force 1 Answer

Hop (Ketchapp) Mechanic (Jump between platforms with certain velocity while controlling object on X axis) 1 Answer

How to decrease/(have constant) speed of a ball rolling downhill? 0 Answers

What is the best way to map the curve of a jump? 1 Answer

Physics Calculation: How to Calculate where Rigidbody will Drop ? 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