I'm trying to learn the basics of Odin by rewriting Raylib's 3D examples. You can see the 3D camera example I was trying to recreate HERE.
I wrote THIS CODE, but it doesn't work. My questions are
- It turns out I can get this to work by changing
rl.CAMERA_PERSPECTIVEto.PERSPECTIVE. Reading the raylib source code says this parameter takes an "int", but passing0doesn't work either, so I guess it's an enum? Why do we write this as.PERSPECTIVEinstead of something that starts withrl.CAMERA_?
2, The same happens for IsKeyPressed, where I have to write 'Z' as .Z instead. I assume it's related to the above. What is going on here?
-
Optional but let me know if I handled Vector3s correctly. Not really sure if I should be writing
rl.Vector3before or after the equals sign in different scenarios -
Optional as well but can I specify a bit depth for float literals that I'm passing into raylib's functions? (For example, can I specify the
0.0s in some function calls to be 64-bit or 128-bit? Or is this always automatically handled)
Thanks!