(solved) A_SprayDecal creates decals higher than actor

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: (solved) A_SprayDecal creates decals higher than actor

Re: A_SprayDecal creates decals higher than actor

by Jekyll Grim Payne » Thu Jan 10, 2019 3:38 pm

You're right! I didn't even realize my puff's height wasn't 1. Thanks a lot, that fixed it.

Re: A_SprayDecal creates decals higher than actor

by Arctangent » Thu Jan 10, 2019 3:15 pm

I imagine it has to do with the fact that SprayDecal fires its linetrace from the center of the calling actor, meaning that if the puff's got the default BulletPuff height ( which itself is the default Actor height), then the decal would be offset upwards by 8mu. Potentially even more visually, due to differences in how the puff graphic and the decal graphic are offset.

Probably simple enough to fix by setting the puff's height to 1 or 2. 0 height might not have any issues when given to something like a puff, but it kinda goes without saying that anything relating to collision being set to 0 will likely result in some dodgy nonsense.

(solved) A_SprayDecal creates decals higher than actor

by Jekyll Grim Payne » Thu Jan 10, 2019 1:28 pm

I want to attach several decals to the puff for reasons. So the decal value is "none" and I use A_SprayDecal(varname) to spawn one of the possible decals. However, it spawns clearly too high.



Notice how the puff spawns below the crosshair position (which is normal with the default attackzoffset value) but the decal appears higher (in fact, at the height of the crosshair). The puff is a standard bulletpuff physics-wise.

Top