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 Negagames · Apr 10, 2013 at 08:57 PM · 3dalphadetectioncolors

3D Objects and Alpha

Hello! I'm developing an Overhead 3d game, and can't seem to find a way to create collision , or influence a Boolean using alpha. What I am aiming to do is create the boundaries for an area using png alpha, then have the player object be able to detect the level of alpha (color.a) at it's position, in accordance to the picture it is above. The picture is on a 3d plane.

Comment
Add comment · Show 5
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 Negagames · Apr 15, 2013 at 03:35 PM 0
Share

Help, please.

avatar image robertbu · Apr 15, 2013 at 04:11 PM 0
Share

Can you show us a picture or drawing of what you are attempting to do? In general it is very difficult to define areas using alpha, but if you are looking at the alpha for a entire plane, then it become much easier.

avatar image Negagames · Apr 16, 2013 at 09:14 PM 0
Share

The alpha of the texture on the plane is varying. The green section has a alpha of 50, while the blue area has an alpha of 40 and the grey section has an alpha of 30. > http://puu.sh/2BpwB <

avatar image whebert · Apr 16, 2013 at 09:22 PM 0
Share

You could probably do a Physics.Raycast from your object down through the plane, get the coordinates of the hit, convert that to plane coordinates, normalize them [0 to 1], and then use that to lookup the alpha value of your texture. That would only give you the exact pixel alpha of where the object is, but you could do other samples around it to try to detect a collision radius.

avatar image Negagames · Apr 17, 2013 at 01:28 AM 0
Share

Ok, it's late here but i'll look into that tomorrow.

0 Replies

· Add your reply
  • Sort: 

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

11 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Finding the bounds of a grouped model 2 Answers

GUIText Alpha transparency not working on Android Table? 0 Answers

C# GameObject is not detecting collision with Character Controller 2 Answers

Move object towards mouse in full 3D space 2 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