| Blockland Forums > Modification Help |
| Deg To Rad not working correctly? |
| (1/4) > >> |
| Demian:
--- Code: ---yaw(mDegtoRad(180)); --- End code --- I expected that to turn me 180 degrees but instead it only turned me a degree or two. What am I doing wrong? I'm just doing this in the console. |
| Munkey:
Tested this in my server: --- Code: ---echo(mDegtoRad(180)); 3.14159 --- End code --- Maybe you aren't using it incorrectly? The Appendix says: I'm not sure what this means, but if it helps. |
| Demian:
The appendix was the first thing I checked but it didn't help. I just want my player to turn 180 degrees. The command in OP should work but it doesn't. |
| Kalphiter:
%rad = %d / 360 * 2 * $pi; This is the way to doit. mDegtoRad(180) does this correctly. There is nothing wrong with the function. Try yaw($pi*360*2); I have no idea why it works |
| Demian:
yaw($pi*360); and yaw($pi*360*2); both turn the player 180 degrees. yaw($pi*180); turns the player 120 degrees. This makes no sense to me. |
| Navigation |
| Message Index |
| Next page |