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 OleP · Apr 02, 2012 at 01:32 PM · androidiosdragtrailrenderertrail

Trail after game object with pause/clear function

Hi there. I'm making a game what is teaching kids, how to draw letters the correct way. The game is for mobile platforms (android/ios). In order to do that, I need unity to make a trail after the gameobject(what you drag around using your finger), when I draw the letter.

The problem with the built in trail renderer is, that you can't tell it to clear up all trails, or pause the trail.

Imagine that you are writing a big A, first you do the inverted V, then the trail must be "paused/stopped", so that you can draw the horizontal line across.

If the player makes a mistake, like writing it the wrong way, the player must start over, and the trail should be erased instantly (instead of fading it after some time, like the trail renderer does by default).

I hope you can follow my trail of thought, if not, I can upload some images to try explain it.

I've been searching for some time, but I've not found any trail renderer that solves my problem. If you know of any solutions, I will be truly grateful!

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 rutter · Apr 03, 2012 at 03:35 AM

Eric will probably link Vectrosity at some point. You might check it out.

I'm assuming you've already checked out line renderers and decided they aren't quite up to snuff?

It looks like you might be able to set a trail renderer's fade time dynamically? I've never tried it, but coupling that with some mechanism that tracks time since player's actual drawing might have some cool potential.

`Time.timeScale` is scene-global, but might be helpful if you still want "instant" fades to look animated.

Comment
Add comment · Show 2 · 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 OleP · Apr 04, 2012 at 07:15 AM 0
Share

Hmm, as far as I can see (right me if I'm wrong), Vectrosity and line renders are all about straight lines. I need a modified version of the trail renderer.

avatar image rutter · Apr 04, 2012 at 07:24 PM 0
Share

That is true, but it's important to remember that most "curves" are actually rendered using a series of straight lines.

You can observe this principle in action by giving a trail renderer a very high "$$anonymous$$ vertex distance", and/or by pausing your game to check out the renderer's generated geometry. It has some very fancy interpolation features, but ultimately it is still drawing a series of straight lines.

avatar image
0

Answer by KevinCodes4Food · Mar 02, 2015 at 10:12 PM

You can set TrailRender.time to 0 to instantly turn off trails. I have more notes on techniques in the forum thread at:

http://forum.unity3d.com/threads/can-i-pause-a-trail-renderer.141607/

Kevin

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Trail renderer color always black 3 Answers

How to detect screen touching more frequently than fps. 1 Answer

Unity iOS Android: open local HTML in Browser 1 Answer

[AR Foundation][URP] AR Occlusion Soft Edges, iOS & Android 0 Answers

Android Gyro explanation? 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