Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Suyuanhan · Jun 22, 2011 at 12:55 AM · cameratrailrendererface

Can trail renderer stop facing camera?

I want to try trail renderer face to Y axis not camera, but there is no setting value for me, Can I set trail renderer not face to camera? Or something instead it?

Thx.....

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
Best Answer

Answer by equalsequals · Jun 22, 2011 at 01:41 PM

I'm not sure I understand, but I believe you are misunderstanding the usage of the trail renderer.

The trail renderer generates a mesh at run-time that is effectively 2-dimensional (it has a width and height but no depth as it is planar)

So, by that logic, in order for it to be apparent in 3D space it always needs to face the camera (term: "billboarded"). This is done when the mesh is dynamically generated by the TrailRenderer component, so you don't have any control of telling it to do something otherwise.

From what I understand, you want is a dynamic mesh that behaves similar to a TrailRenderer, to follow a Game Object with a set amount of decay, but you don't want it to face the camera, but rather always face up. Is that correct? Leave me a comment and I may be able to point you in the correct direction.

[Edit]

Glad to see I understood. As Christian commented, you will have to create a component which essentially does the same thing as the Trail Renderer & Line Renderer, but instead does not dynamically orient the faces of the generated mesh to always face the camera.

In order to achieve something like this you will need to have reference to the object your custom trail renderer will be following. From there you will need to know your way around the Mesh class. You will probably be adding a new face to the mesh every frame, connecting the most recently created face to the transform of your target. You will likely also want to remove very old faces based on some level of decay.

Unfortunately I don't have time to mock up any pseudo-code or write examples but hopefully that's a push in the right direction for you.

Cheers

==

Comment
Add comment · Show 6 · 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 Suyuanhan · Jun 23, 2011 at 05:23 AM 0
Share

Yeah,you're right,but is there something a can do to create object like TrailRenderer but not always faces camera,face X,Y,Z axis ins$$anonymous$$d?

Thank you very much!

avatar image CHPedersen · Jun 23, 2011 at 06:35 AM 0
Share

The TrailRenderer's "face-the-camera"-behavior is built-in and inherent to it. It shares this functionality with its sister, the LineRenderer as well. As you've discovered, there is no way to change this. You'll have to create a new trail renderer yourself that doesn't exhibit this behavior.

avatar image Jason B · Jun 23, 2011 at 02:38 PM 0
Share

To equalsequals, I can think of a few reasons why you might not want the trail to face the camera. For instance, if you're making a Tron-like light cycle trail, this kind of functionality would be necessary.

I agree with your answer, but I was just pointing that out.

avatar image equalsequals · Jun 25, 2011 at 03:09 PM 0
Share

I never said that there weren't any reasons, I simply stated that he didn't understand the usage of the Trail Renderer component and what he wants to achieve is out of scope.

avatar image HolBol · Jun 25, 2011 at 03:17 PM 0
Share

look at the Procedural examples on the Unity resources page. It has what you need, (TRON Trail).

Show more comments
avatar image
0

Answer by HolBol · Jun 25, 2011 at 08:30 PM

Nope, is your answer. Look at the Procedural examples on the Unity resources page. It has what you need here, (TRON Trail). It works just like a trail renderer just without billboarding, so it twists and turns with the orientation of the gameobject it's on.

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

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

8 People are following this question.

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

Related Questions

Unity trail render attached to rigidbody is jittery 0 Answers

How to make camera position relative to a specific target. 1 Answer

Stop trail renderer from terminating half-way into the camera. 2 Answers

Face tracking using Intel RealSense Depth Camera D435 in Unity 0 Answers

How to make remote player's healthbar GUI look at local player's camera? 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