简体   繁体   中英

How can I add collisions to Trail Renderer?

I have a bullet and the trailrenderer following it. I want to add collision to this beam.

created something like a laser beam. It has an invisible bullet at its tip. My problem is that I can't add collisions to the trail renderer that follows it.

What you can try and do is to create a prefab for the bullet. You can do this by creating a prefabs folder in the folders window and adding the bullet to it. There click the bullet in the prefabs folder and open the prefab. You can either double click or open it on the inspector window on the top. After that add the trial renderer and add the trial as well. What you can do is to make the hitbox of the bullet bigger until the trial is covered as well. That is what I do so it should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM