Sorry for my late response! ![]()
I wouldn't necessarily recommend to work with individual quaternion values directly (i.e. the x, y, z and w values). There is really no need to understand the complex math voodoo behind them. If you just want to set rotation values directly (i.e. a rotation around the x, y and z axis), you can just use "euler angles" - the API has a fromAngles() method for that where you can set the pitch, yaw and roll.
In your case it looks like you want to align something to the ground normal? This is a bit more complex, but you can just use vector math for that (which is much simpler and more comprehensible than quaternion math). Basically you just have to calculate a new direction vector (aligned to the ground normal) - this can be done by calculating the cross vector of the normal and forward, then use that to calculate the cross vector of the normal. The resulting vector can be used as direction for the Quaternion.lookAt() method (but it's necessary to provide an up vector then, which is just the normal in this case):
We can add a new util method with the next update btw which can produce an "aligned direction" ![]()