Download

Trig between socket and impact normal?

Hey all,
I have been trying everything to get this rolling but it’s just not really working.

My trace works, returns an impact normal.

if I
Cross between socket’s up vector & impact normal, then dot with z=1, then acosd, then subtract from 90, I end up with a value that doesn’t actually exactly match the plane of the normal but does rotate based on direction.

I can get the accurate normal angle without any of that by just making rotationfromxvector off the impact normal and subtracting 90 from it’s pitch value, the difference is little, but enough to make the bone not sit where it should.

I attempted multiplying the value by the Z of Cross between Socket Right Vector and Impact Normal, but this too is giving close but not accurate results.

what am I missing here?
it’s probably a brain fart or something obvious I’m not considering…

Oi, scratch this.
It was definitely a brain fart. I was doing math on the box trace impact point rather then the box trace so my trig results were “explicably” off and was causing the extra offset issue I could not correct in my foot IK system.