Advertisement

Latest mathematics Activity

How do I implement a multiplier to buy multiple levels at once?

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…

5,346 views
Advertisement

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?

8,825 views

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 ?

9,786 views

I had to normalize right and up.

47,229 views

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.

10,025 views
Advertisement
Advertisement