Quantcast
Channel: Answers by "murkantilism"
Viewing all articles
Browse latest Browse all 99

Answer by murkantilism

$
0
0
Clarify what isn't working, this doesn't make any sense:> I have this code but it doesn't work the way I want to, so he's shutting down without sliding smoothly The first issue I can see is that doubling the camera size does not give you it's height: >float cameraHeight = Camera.orthographicSize*2f; And you later divide this value by 2f in the ApplyBounds() function, so why are you even doubling it in the first place? and this line is redundant: >float cameraWidth = (Screen.width * 1f / Screen.height) *cameraHeight; Basic math: (w * 1/h) *h will always give you back w, just do Screen.width I'd start with cleaning out these basic errors in math/logic, then come back to explain what the problem you're seeing is.

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>