#### Archived

This topic is now archived and is closed to further replies.

# Bullet Mark

This topic is 5601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Im trying to make a Shoting system(almost done) and im having dificulties making the BulletMark(you know : the "hole" it leaves on the ground...) Actually what I need is to make a small quad out of a plane normal/triangle ... So far I have the planes normal and I`m usaing some strafing function to make2 points on the 2 sides and rotate them on 1 axis to make a small quad. The thing is that my code makes different sizes of quads based on the plane/surface wich sucks,what I would like is a simple functions/anything that can make from 1 plane/triangle at a point P a small quad ||(paralel) to the plane . PS:It can also be used to spill blood .

##### Share on other sites
I''ve never actually done decals before but this is the way I think you would do it.

#1 Decide which face you have hit
#2 Get that face''s normal, we can call this vector n
#3 Randomly grab two points belonging to the face and create a vector between them. This will be vector v1. Normalize v1.
#4 Perform a cross product between v1 and n to get v2. This will give you the second vector you need, which will be perpendicular to the face normal.
#5 Scale the vectors v1 and v2 to your desired size of the decal.
#5 Create the quad using v1 and v2

1. 1
2. 2
Rutin
19
3. 3
khawk
15
4. 4
5. 5
A4L
13

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633743
• Total Posts
3013644
×