• 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 alesten · Jun 16, 2013 at 12:16 PM · 2dshadowstopdownpoint-light

Lighting wont behave as I want it to

Hey

I'm in the development of a game with some friends. Our game is a 2D top-down view but the lighting wont behave as we want it to.

alt text

As you can see on the image our game is very dark (like we want it to be) and the only light source is a "Point Light" on top of the player (yellow square). Our walls are the red ones. We want the light to behave as in the picture shown below

alt text

As you can see everything behind our wall is dark but our wall is still visable (we have no testure yet). We would like to be able to go up to a corner and not be able to see what is behind it before walk pass the corner. We've been sitting 4 man 6 hours each and try making it work with no luck, I'm sure it's something really simple.

I hope you understand it, if you don't just ask questens here and I will answer them as fast as I can.

Thanks for any help in advance!

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
0

Answer by kilian277 · Jun 16, 2013 at 03:35 PM

You can use layers ,add the walls to a layer and on the light change the cull mask so that the "wall" layer is off.

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 alesten · Jun 16, 2013 at 04:43 PM 0
Share

Doesn't help

alt text

As you can see on the picture there are still light on the floor behind the wall, with is there I didn't want any light, plus I know can't see the texture on the wall

udklip.png (133.0 kB)
avatar image
0

Answer by Flemingjp · Jun 16, 2013 at 06:20 PM

Try placing the light source to / slightly above the player. If the light is lower than the walls the walls may cast the shadows you want.

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 alesten · Jun 16, 2013 at 06:29 PM 0
Share

The light is above the player

alt text

On the picture you can see that I've tried make the wall really big but still no change

udklip.png (141.6 kB)

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

16 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make shadows in Top Down 2D game 1 Answer

Disable angular shadow recieving in 2D? 0 Answers

2D Top down shooter, gun is shaking while moving and Cursor solutions 0 Answers

Hiding a sprite partially (shader? masking?) 0 Answers

Top-Down Movement in Unity 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