Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
3
Question by Andrew 4 · Jun 29, 2010 at 05:35 AM · shadowprojectorblob

Blob Shadow Always Pointing Down?

I have a ball (rigidbody, can move rotate etc) that I want a simple blob shadow on, so I attached a projector. The problem is, the projector rotates with the ball when it is moving around... Is there a simple way to keep the shadow projector pointed "down" (which is actually at a wall in my game).

Thanks!

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

1 Reply

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

Answer by CarbonTech Software · Jun 29, 2010 at 06:01 AM

Yep, there's a script that was developed specifically for that (speaking of which, I need to implement soon into my game). Oh, the script is written in CS (C sharp format). Just attach this script to the object with the blob shadow.

using UnityEngine; using System.Collections;

public class BlobShadowController : MonoBehaviour { void Update() { transform.position = transform.parent.position + Vector3.up * 8.246965f; transform.rotation = Quaternion.LookRotation(-Vector3.up, transform.parent.forward); } }

Comment
Add comment · Show 3 · 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 Andrew 5 · Jun 29, 2010 at 10:29 PM 0
Share

Thanks for the help! I can't seem to get it to work though... I have a ball prefab with a projector component set to a blob shadow material (and it also ignores the layer "NoShadow", which the ball is on), but I don't see a shadow. When I look at it running, it also looks like the projector is still rotating. All of this happens when I attach the script to the ball prefab. Am I doing it right? I am new to Unity :p

avatar image Andrew 5 · Jun 29, 2010 at 10:39 PM 0
Share

Never $$anonymous$$d! I got it figured out (created a separate shadow object, added the ball and shadow projector object into one prefab, assigned a script to the projector part of the prefab)

avatar image formidable · May 25, 2012 at 01:25 AM 0
Share

Thanks! This is exactly what I was looking for

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

No one has followed this question yet.

Related Questions

Blob shadow problem 2 Answers

[Unity3D 3.5.6f4] Get rid of shadow projector artefact 1 Answer

Projector (Blob Shadow) does not work properly 1 Answer

Projector LookAt Player 2 Answers

Shadow Projector Component not pointed down 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