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 Maru07 · Jul 04, 2012 at 12:08 AM · androidiphonetouchparticletrailrenderer

Making a Touch TrailRenderer

Hey Guys thx for reading. I tried different things but non of them worked right till now.. Everytime the User touches the screen and moves it around it should leave a trail behind the finger as you can see it in many different mobile games like fe. Fruit Ninja. The answer may be banal but I really want this to work out right so Im asking you Pros. Every Answer is highly appreciated and please ask if something is unclear. 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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by DannyB · Jul 09, 2012 at 09:02 PM

Hi,

You can try one of the few gesture plugins. They are not free, but reasonably priced.

  1. Input Touches - Demo is here and the store link is here. In particular, see the swipe example.

  2. Easy Touch - Demo is here and the store link is here. In particular, see the one finger example, and swipe your mouse there.

  3. If these didn't help, see Finger Gestures. A little pricier but belongs in this list.

EDIT: Here is how to do a mouse and touch trail with Input Touches plugin and Trail Renderer.

  1. Open a project with Input Touches imported.

  2. Make your camera orthographic.

  3. Drag the Input Touches prefab (from the Input Prefabs folder) to your scene.

  4. Create an empty object, and attach a trail renderer component to it.

  5. Make sure you set up the trail correctly, with a proper particle material. If you don't have one, import the Particles standard package.

  6. Make sure your empty object is properly positioned in the world. You should see a sample trail in the game window, when you move the object in the scene window.

  7. If all up to here is good, add this script to your Trail game object.

Hope this helps.


dragme-cs.txt (353 B)
Comment
Add comment · Show 9 · 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 Maru07 · Jul 10, 2012 at 01:26 AM 0
Share

I actually have Finger gestures and input touches but I just couldnt get through them because of the lack of tutorials. Its really not as self explaining as they think it is^^

avatar image DannyB · Jul 10, 2012 at 06:24 AM 0
Share

I see. But the input touches should have an example of exactly what you need no?

avatar image DannyB · Jul 10, 2012 at 05:18 PM 0
Share

Added a step by step solution.

avatar image Maru07 · Jul 11, 2012 at 02:53 AM 0
Share

Great thank you :) I will give it a try tomorrow

avatar image kaanersan · Jun 13, 2014 at 10:35 PM 0
Share

Hey, thanks a lot for this answer, I'm using NGUI and want to draw the trail on my 2D (NGUI camera). When I use your code, the trail is drawn on the NGUI (2D camera it seems) however, I only see the trail in the Scene view and not the game view. Any reason for this? Thanks in advance.

Show more comments

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

Touch Hold for Power 1 Answer

2D Camera (Android, Iphone) 1 Answer

Trail renderer color always black 3 Answers

InputManager vs iPhone/Android 2 Answers

Replace Touch commands with mouse events 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