Is there any way to declare and use a custom Up vector in the FindLookAtRotation function?
Reason i ask, is because it seems the return value always uses the world Z as up. So making games like “f-zero/XGRA” is a nightmare.
Basically, i’am having a break from c++ coding and giving visual blueprints a go, really enjoying it.
Heres my original source code using a different engine:
D3DXQUATERNION qBikeRotation; iVectorRotate(&vUp,&vUp,&qBikeOrigin); iQuaternionLookAt(&qBikeRotation,&vScanDownCp,&(vScanDownCp+vScanDownCn),&vUp); D3DXQUATERNION qForward; iQuaternionFromEulerAngles(&qForward,-90.0f,180.0f,0.0f); iQuaternionMultiply(&qBikeRotation,&qForward,&qBikeRotation);
This gives me the rotation relative to the up vector of my source (qBikeOrigin in this case). I can then use this rotation to apply directly to my object. In effect, it will rotate an object to match the hit normal. Say hello F-zero.
This is how the bluerpint looks, but, without being able to declare the Up vector in the “FindLookAtRotation” function. It cant be done.
Does anyone know a way around this, or, is there another method?