Decal alignment problem
Hi, I want to by using blueprints align my decal when placing them based off of the hit surface impact normal.
In this pic you can see that I have it working good while hitting the floor. The decal should be in the same direction as the white arrow
When I start shooting up a wall this happens:
I'm having trouble compensating the decal orientation and would be happy for any help on it :)
I do want to do this with BPs and here is my current nodework in its simpliest form:
the rotation from XVector only seems to work from the floor angles only. Again thanks for any suggestions =)
asked Dec 07 '14 at 02:28 AM in Blueprint Scripting
Thanks again for the suggestion. I was not able to get that idea to work out. However, I did work on more equations and came up with a solution that works great.
And for anyone interested in my Blueprint
Thanks for all your suggestions!
answered Dec 10 '14 at 06:54 AM
Hey Devero - just so I understand your blueprint code correctly, it looks like you are determining a vector in which to align the decal. Given that decals project onto surfaces through their -ve X axis, I would suggest the best way to achieve the result you're after is to find the surface normal of the point you want to align to, and get rotate onto that instead (to ensure that your decal is projected onto the surface correctly).
You should then be able to calculate a rotator for the local-space yaw that rotates the decal's YZ plane into the correct direction.
I hope that makes sense? I'm happy to elaborate if needed - check out the surface snapping feature in the editor to see how we do this for placement of actors (which includes decals)
answered Dec 08 '14 at 04:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here