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 Decaderox · Mar 26, 2015 at 11:40 AM · 2drendererlinerenderermouseclicktrailrenderer

Trail Renderer detection

Hello,

How can i detect a trail renderer or a line renderer drawn by the player with mouse button? I have no idea how to scan the draw made by the player.

The desired effect is like this minigame: https://www.youtube.com/watch?v=0JE3Qgwluz8

Comment
Add comment · Show 4
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 AlwaysSunny · Mar 25, 2015 at 07:03 PM 1
Share

Forget the trail renderer; keep a record of where the brush has traveled. Do this by adding a new vertex to a collection of verts every X distance the brush moves. I guess you could do this with the trail renderer itself, but I wouldn't want to.

Extrapolating useful information from this collection is a whole different story. If you really are re-creating this $$anonymous$$igame's mechanics, the easiest way to analyze player activity involves having a high-poly pre-existing mesh shape you've created which the player is trying to match. Exa$$anonymous$$ing the brush's "traveled path" collection and checking for proximity to verts in the shape you're tracing would tell you roughly how accurate their tracing was.

Doing anything more complicated gets into stuff like gesture and handwriting analysis, which is a deep and complex topic. Perhaps 3rd party solutions exist which can make life easier. It all really depends on what you need this information to do for you.

avatar image Decaderox · Mar 26, 2015 at 03:31 AM 0
Share

What if i establish a colision path on the object that i want to be painted by the player and check if the collision of his brush enters all the collision of the object? I will try putting smaller gameobjects with collision triggers in the front of the object that i want to be painted and check with booleans or with a int counter if the collision of brush pass by all of them. Thanks for the idea!

avatar image AlwaysSunny · Mar 26, 2015 at 02:34 PM 0
Share

How well that'll work depends upon how much accuracy you want, and whether you want to penalize the player for mistakes. Your way is fine only if you don't care whether the player makes errors. With your suggestion, the player could spend 30 $$anonymous$$utes doodling in the margins without penalty, or otherwise make errors which won't be caught. It all depends upon what you want. :)

avatar image Decaderox · Mar 27, 2015 at 05:08 PM 0
Share

I can reduce the size of the paint collisions enough to the size of the brush collision. I was thinking about highlight the objects that the player had passed with his brush. The player just needs highlight all objects to solve the puzzle.

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

2d bullet trail 0 Answers

Line Renderer Ilumination 1 Answer

2D renderer with particles on UI 1 Answer

Manually add vertext to TrailRenderer? 1 Answer

Trail renderer not rendering over sprite background 4 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