- Home /
4.6 gui shakes
Hi i have to atatch my ui to my player so that it works with mutliplayer easier and i can enable and disable parts of it easier but when using screen space camera with a plane distance of 1.2 it shakes alot any higher and it passes through walls so what can i do?
is their a way to make it client side? so that the user can turn off an on pieces
Can you show an image of where on the player you've attached the GUI to the player, it sounds like it's being affected by the animation on your player but I can't be sure.
Consider setting it in front of the player with code rather than attaching directly.
Answer by makrio · Jan 12, 2015 at 01:28 PM
What kind of game is it? A 3rd person shooter?
I would use an empty object that smooth follows your player object. Use one of these smooth follow scripts with lerp functions. Then attach your canvas to that object.
first person using character controller i need the ui to be a child of the player so that it can be accesed via findinchildren
Answer by InvincibleCat · Jan 12, 2015 at 10:34 PM
If the UI doesn't need to move and / or follow the player, don't attach it to the player. Add a reference on your player script. So you will be able to enable/diable UI exactly the same way!
Cheers
no but the ui needs to haev acces to the player so i need it connected to the player for multiplayer so that they dont all share the one inventory the one options menu
so do the other way => player is the child of your UI
Or my guess would be to use a singleton or a good way to affect the reference
Your answer
Follow this Question
Related Questions
Unity Advanced Water Problems 0 Answers
Making a non-game app with c++ and Unity 2 Answers
Help Ship Controll 0 Answers
how can i get a pause screen to work 0 Answers