• 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
4
Question by raul corrales · Mar 17, 2011 at 03:33 PM · raycastshootdecalcorner

How i can repair my shoot decals?

Hi, i use a system of decals to shooting. When i shoot at the corners is it: alt text

and i want this:

alt text

Comment
Add comment · Show 3
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 efge · Mar 17, 2011 at 03:58 PM 1
Share

Upvote for a classic :-)

avatar image DaveA · Mar 17, 2011 at 05:05 PM 0
Share

I hope you're gonna port the music over too, in glorious $$anonymous$$IDI-quality

avatar image Jessy · Mar 17, 2011 at 05:43 PM 0
Share

Hey now, $$anonymous$$IDI isn't audio. Every modern composer uses $$anonymous$$IDI! It's all about the synth. But still, I've heard a lot of renditions of the themes, and none of them hold a candle to the original blippy bloops.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Marnix · Apr 07, 2011 at 10:13 PM

Multiple solutions are possible for this problem. Currently, you are creating decals of a standard size, which gives problems of course.


Solution 1
Update the actual texture, don't use decals. Write your decal to the texture instead.


Solution 2
Perform multitexturing on every object that is shootable. Create a new texture with your decals in it, wrap it onto the building.
This solution is a memory eater, it creates textures for every object


Solution 3
Do a check of your decal when adding it to the wall. You could think of shooting rays from the back of the decal again. Or do a box intersect. The intersection points will let you clip your decal texture.
Yes this is a hard one, but gives you more freedom in your decals

The cheapest solution is texture manipulation. (But I think you will need a renderTexture for that?) It will result in the same amount of draw calls, where your decals create 2 extra triangles per decal (100000 bullets ouch).


Update
I found this little project on the forum: http://forum.unity3d.com/threads/2562-blood-splatter

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
1

Answer by Arnout Swint · Mar 21, 2011 at 12:13 PM

Awnser:

don't shoot to close at the corners haha

no just kidding...

what you could do (some sort of workaround) is create an non-collidable invisible wall right next to the corner that will overlap the decal.

just a thought :)

Comment
Add comment · Show 1 · 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 Marnix · Apr 07, 2011 at 10:14 PM 0
Share

@Arnout, nice but inaccurate workaround =) Will also cost you extra memory to save an extra collision model for your whole world.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Decals on corners 1 Answer

2D Bullet texture follow ray and Bullet Holes 1 Answer

Decal stretching on rotated planes 1 Answer

How i can create a cube with specific coordenates? 3 Answers

my ray cast is only shooting out a few meters no matter the distance. 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