- Home /
Answer by Bampf · Apr 26, 2010 at 01:52 PM
Games generally do this with a technique called "decals". Search Unity Answers for "decal" for previous questions on this subject.
Edit: You asked for more specifics. The following answer has a two-line snippet of code that instantiates a bullet object at a point where a raycast hit something: http://answers.unity3d.com/questions/985/adding-decals-to-a-object
The following answer is about how to use a raycast to find a location where something was hit: http://answers.unity3d.com/questions/3753/location-of-raycast-collision
Those two answers contain most of what you need, as far as scripting goes.
I was wondering how to dynamically add decals based on a raycast hit
Answer by ruben_hiet · May 15, 2011 at 11:43 AM
is it possible to instentiate a projector on the position you hit an object and just project a texture of a bullet impact? I don't know anything about projectors but thought it is maybe possible?
Your answer
Follow this Question
Related Questions
How to stop textures flickering 2 Answers
Checking material on raycast 1 Answer
Instantiating Muzzle Flash 1 Answer
How do i make a Railgun style effect with a raycast shot? 1 Answer
Assigning UV Map to model at runtime 0 Answers