I currently have a sphere i can move around using the arrow keys and force in the fixedupdate.
I just created some canvas buttons because i wanna use those to move my sphere around. I have seen some people use the OnGUI in which they use transform.
My question is, is this smart? Update and fixedupdate run on the FPS, OnGUI doesn’t. This would mean i would move my sphere “outside of the fps context”.
Any help is welcome!
PS: i wanna move the sphere using GUI buttons because I’m creating an android game.
Using OnGUI for anything else other than GUI stuff is not a good idea.
See my answer here about Update vs. FixedUpdate. You could probably substitute OnGUI for Update, but it would be wise to add an extra separation between functions and pass OnGUI inputs to Update then onto FixedUpdate.
Also, to clarify; FixedUpdate is NOT FPS dependent, it’s “fixed” FPS for physics in Time project settings (by default 0.02 ms or 50 fps).