Posted By: Reconnoiter
ent_decal and manually setting hit struct - 01/29/18 18:08
Howdy,
With ent_decal I want to place decals without doing a c_trace before it. According to the manual you can manually set the hit.x(yz), hit.nx(yz) and hit.model = NULL and it should work. For me it doesn't though (I don't seem them anywhere), I guess I am setting hit.nx wrongly but I am not sure. (Also if I do it with a c_trace it does work so I am setting some of the hit struct wrongly.)
Ty for taking the time!
With ent_decal I want to place decals without doing a c_trace before it. According to the manual you can manually set the hit.x(yz), hit.nx(yz) and hit.model = NULL and it should work. For me it doesn't though (I don't seem them anywhere), I guess I am setting hit.nx wrongly but I am not sure. (Also if I do it with a c_trace it does work so I am setting some of the hit struct wrongly.)
Code:
hit.model = NULL; debug_var1 = hit.x; //correct coordinates debug_var2 = hit.y; debug_var3 = hit.z; vec_set(hit.nx, hit.x); vec_normalize(hit.nx, 1); PARTICLE* p = ent_decal(ent, _bmap, _size, _rot); p.lifespan = _time;
Ty for taking the time!