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 Knightleaf · Jun 29, 2012 at 08:21 PM · normalsanglesportalflat

make one thing flat to another

im working on making a portal style mechanic that works on anything, so i need it to work on any surface, my problem is that if i shoot a portal on a surface thats at a weird angle it just looks off and awkward, how do i get the portal model i've made to be flat against the surface its being shot at?

TLDR : how do i get the portal model ive made to be flat against the surface its being shot at?

Comment
Add comment · Show 1
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 GC1983 · Jun 29, 2012 at 08:31 PM 0
Share

Reword your question, its hard to get what you are asking. How is it "weird". Need better details.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Piflik · Jun 29, 2012 at 08:35 PM

There is a reason why Valve allows portals only at locations that follow some rules: i.e. flat and big enough ('white' is not a technical reason, that is only a gameplay mechanic)...it is very difficult to make them work on arbitrary surfaces. With flat surfaces it is quite straight forward: all you need is the surface normal (and the center of the 'tile', so the portal doesn't appear at a corner and sticks out of the wall)...from the top of my head I can't think of a mechanic, that would work with curved surfaces...you could try painting the portal on the surface using projectors, and a collider to move the player to the outgoing portal, but that would probably not look or behave like the real deal...

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 Knightleaf · Jun 29, 2012 at 08:44 PM 0
Share

are you saying that valve pre set the angles of the portals that will hit them so that they always look right? i have a few ideas of how to do it but im not sure if they will work 100% :S

avatar image Mizuho · Jun 29, 2012 at 08:46 PM 0
Share

Unfortunately, if you have tried Portal, you can actually shoot through the seams between walls. I think they used a variation of their "you can't shoot here" walls to cover up the corners, leaving a tiny gap there that you actually can shoot through.

avatar image Piflik · Jun 29, 2012 at 08:48 PM 0
Share

The angle doesn't matter, only that the surface is flat. If you have the surface normal, you can rotate the portal accordingly.

avatar image Mizuho · Jun 29, 2012 at 08:51 PM 0
Share

@$$anonymous$$nightleaf: I thought the angle was decided by your character's orientation when they shot the portal? I haven't played in a while, but I thought that was how they did it...

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting slope angle from normals. 3 Answers

How to make a Vector with the same angle as a certain object? 1 Answer

Getting Player GameObject to rotate to the slope of the ground it is walking on 1 Answer

Calculate collision angle [c#] Weird results? 1 Answer

Can someone explain why the angle between the Normal and Global Up equals the angle of the slope of the ground? 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