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 Zu01 · Jul 20, 2011 at 04:48 PM · collisiontrail renderer

Trail renderer with damage

I have seen some topics on Trail renderer collision, but none of it made sense to me. Do you use a script? Or is there some item on the Unity3d menui can use, I thank you in advance.

Unity3d - regular
Scripting exp - moderate

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
1

Answer by Chris D · Jul 20, 2011 at 05:32 PM

I'm going to go ahead with the assumption that you are referring to this thread in terms of what you didn't understand. The idea proposed there is to get the points at which the trail renderer is creating it's particles and doing a raycast between them.

Looking at the documentation, it doesn't seem that it's easy to get all the info you need from the object itself (you can set the minimum vertex distance, but I'm not sure how or if you can access that list of points) so I propose a different solution: fake it.

Make a series of small gameObjects with colliders (but no mesh renderer) inside the trail and just use unity's regular features.

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 JUnityer · Jul 20, 2011 at 05:28 PM

I don't know how to make the trail renderer itself collide, but I have a suggestion how to do it if you are trying to make a bullet or anything similar that's supposed to make damage to enemies or something...

I would make an invisible game object, for example, a small sphere (disable it's mesh renderer but not the collider). Then add a trail renderer to it, adjust it's settings for your liking, and make it a prefab (or whatever you need it to)

That would make a trail renderer that can collide! Hope you understand what I mean...

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 Chris D · Jul 20, 2011 at 05:33 PM 0
Share

beat me to it :D

I'll leave my answer below as reference to the docs, but yes; do this.

avatar image Zu01 · Jul 20, 2011 at 07:11 PM 0
Share

$$anonymous$$ake a small sphere every so often, it makes sense to a point, but if you had 3 object with trail, wouldn't that bog down the game alot?

avatar image Chris D · Jul 20, 2011 at 07:16 PM 0
Share

To a point. It's going to depend on how frequently you want to create a new object there, how many you want to have available at once (how long the trail will be), etc. It's just a matter of balancing the behaviour you want with the performance you need.

avatar image JUnityer · Jul 21, 2011 at 11:21 AM 0
Share

In that case I would probably do it using raycasting, but if the trails aren't supposed to be very long or that they are destroyed over time, the gameobjects should manage well. What are you going to use this for, by the way? something like Tron, perhaps?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Trail Renderer Hardening? 1 Answer

Immortal enemies when reanimated, or pooled game objects re-activated do not respond to collisions? 1 Answer

How do I use compute shaders with particles? 0 Answers

How do I check collision above? 1 Answer

Character Controller Collisions Question 1 Answer


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