holes

Posted By: GaniX

holes - 08/13/13 22:21

hello everyone, i would need to know how can i print on the wall sprites of bullet holes, i´m thinking in using something like a trace, but i have a problem, and it´s the orientation of it (vertical / horizontal). For example the player shoots the wall, then i have a vertical hole, but if i supouse the player walks back and shoots in the same direction and hit the roof i have an horizontal hole... if i use the camera pan or tilt i can not do this because if i supouse the player shoot in the same directiom but hit diferents things(wall or roff) the orientatin of the hole will be diferent. how i can make the hole to have an orientation respect to the wall, roff or anything i hit?
Posted By: Superku

Re: holes - 08/13/13 22:28

Use decals (ent_decal after c_trace)! The manual has a working code example on the ent_decal page.
Posted By: GaniX

Re: holes - 08/18/13 01:00

i study the ent decal...but i can not use because is only the comercial edtion. i have the free version.
is another way to do that ? and not use decal
Posted By: Superku

Re: holes - 08/18/13 01:20

If you shoot a wall and want to place the bullet hole there (at target.x/ hit.x), you can try to rotate the orientation of the sprite by the normal vector, thus vec_to_angle(bullet_hole.pan,normal);
Posted By: GaniX

Re: holes - 09/14/13 18:27

yes works fine tks
but i have another question...
when i shoot, the holes sometimes is cannot see.
i use the znear instrucction but... if i use the znear i can see the holes over the entiities
what can i do?
Posted By: rayp

Re: holes - 09/14/13 18:55

ZNEAR was not made for that. Its fex for carryed weapons.
Correct the pos of the sprite ure placing? fex
Code:
void placed_blood_leak(){
   my.tilt = 90;
   my.z += 5; // a bit higher than hit by trace or whatever
   ..

Posted By: Ch40zzC0d3r

Re: holes - 09/14/13 18:59

Rotate it and substract hit.nx from the position
© 2024 lite-C Forums