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 GreenHat · Mar 23, 2011 at 09:56 PM · terrainplanebillboard

Can I make a billboard plane on terrain tree prefab?

I made a plane in Max and painted a tree with an alpha on it. I painted that tree (plane) on the terrain layer. I want it to have billboarding to always see my 3rd person game cam. Can this work with the terrain like that?

This is what i used as a script that i threw in the tree prefab:

function Update()

{ transform.rotation = Quaternion.LookRotation(Camera.main.transform.up,Vector3.up); }

The code I have isn't working though.

I also tried this with no luck:

function Update()

{ transform.rotation = Camera.main.transform.rotation; }

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by DaveA · Mar 23, 2011 at 10:18 PM

Did you try the Billboarding script from the script wiki?

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 GreenHat · Mar 23, 2011 at 10:57 PM 0
Share

Okay, just tried that script: http://www.unifycommunity.com/wiki/index.php?title=CameraFacingBillboard I tried to drag and drop the script into the tree prefab, but i got a popup telling me my object was not the same class type?

avatar image DaveA · Mar 23, 2011 at 11:31 PM 0
Share

Did you drop it on the prefab (in the Project window) or an instance of the prefab (in the Hierarchy window)?

avatar image GreenHat · Mar 24, 2011 at 02:32 AM 0
Share

I tried dropping it in the Project prefab. I don't have an instance in the Hierarchy window...they're on the terrain layer.

avatar image
0

Answer by Jason B · Mar 23, 2011 at 10:29 PM

Just out of curiosity, why not add your tree billboards as billboarded terrain grass? Would achieve the same effect. And for that matter, they would even be able to sway in the wind.

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

Answer by GreenHat · Mar 23, 2011 at 10:46 PM

hahaha no I did not try the Billboarding script from the script wiki! Now that I know that exists, I may juuust do that! Do you have a link?

The reason I didn't make it terrain grass is because my initial thought was: This tree type would only be painted far away from the player. I also have grasses as detailed grass. If I did the tree like this and it's only for distant trees, wouldn't I only see them as I just approached them like the grass layers? I know I can tweak the viewing distant of the grass details as a whole, but I don't want to have to 'draw' all that grass until i'm close...right?

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 DaveA · Mar 23, 2011 at 11:32 PM 0
Share

Please add comments, rather than new answers, unless you really are answering your own question. $$anonymous$$akes it easier to follow.

avatar image Jason B · Mar 23, 2011 at 11:36 PM 0
Share

Ah, alright. That reasoning does actually make sense. Your script should work, but I think you'd have to hand-place each far-off tree. As far as I know, painted terrain objects can't run scripts (someone correct me if I'm wrong).

avatar image GreenHat · Mar 24, 2011 at 02:30 AM 0
Share

Damn...so no real way to make my terrain plane trees billboard?

avatar image GreenHat · Mar 24, 2011 at 06:10 PM 0
Share

There's gotta be some kinda of work around...right?

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

Terrain; Billboards cutting off artwork for custom trees 1 Answer

I have a game that I want to create a tilted plane in. 1 Answer

Is there a way to set Billboarding to 0? 0 Answers

Tree billboards not displaying correctly. 1 Answer

Low quality billboards in terrain, any way around it? 0 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