Latest mathematics Activity
Please help to implement the function of buying multiple levels as in the screenshots.
To calculate the new price use the formula:
newCost = baseCost * Mathf.Pow(multi,lvl);
float baseCost - fixed base price of buying a levelnew
float newCost - constantly changing new price
float multi - multiplier, whi…
Why with a cam->vec (0, 1, 0) or (0, -1, 0), a rotation on the yaw axis is actually made on the roll axis ?
Is it the gimbal lock? It is present only for these two axes? How to fix this problem?
The way I find up_tmp in init_camera_axis() is not optimal because if my cam->vec is (1, 1, -1) I can't find the right up_tmp. I currently find (0, 0, 1) and it should be equal to (-1, 0, 1). Do you have any idea how I can correct this ?
I had to normalize right and up.
Thank you very much for your help.
Finally, this helped me :
https://gamedev.stackexchange.com/questions/185245/rotating-camera-in-3d-without-yawing-diagonally
I still have to calculate the angles and manage the interval.