Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Leucaruth · May 07, 2014 at 08:07 PM · 2drotationguimobileperformance

Mobile Performance with GUI and Rotations

Hi.

I'm maing some GUI for a 2D mobile game and did some search to find the best way to implement it. I'm trying to make an arrow to rotate around a pivot in a 360º angle. So far I discovered:

  • For mobile, OnGUI is out of the question as discovered here, so we need to use the old GUITextures

  • Rotation is not possible with this GUITexture approach as discovered here

  • I need some kind of GUI component as it maintains proportions even with camera projection changes.

  • I don't want to use animations as it's direction it's determined by a changing angle value that updates continuously.

The question now is, I'm completly out of ideas, if I can only rotate with GUIUtility.RotateAroundPivot, how can I implement this without making it a performance issue?

If a more detailed explanation is required or do you have any question, please, ask, I'd be more than happy to answer.

Thanks and regards

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Pyrian · May 07, 2014 at 09:08 PM 0
Share

Ooof. Well, bullet points one, two, and four aren't tractable, but bullet point three IS. Just create a sprite in the foreground that follows the camera, adjusting it as necessary. (Not sure what you mean about "maintaining proportions" since sprites do that.)

avatar image Leucaruth · May 09, 2014 at 08:10 PM 0
Share

Thanks for your answer :). What I meant is that if Ichange the orthographic camera projection size I need to increase the scale of the item and its location based on that projection size change and I fear that it can "flicker" or something similar when fast changing projection size too fast.

I'm trying to do right know with sprites, when i'm done I will report if this is really the best solution or not :(

avatar image robertbu · May 09, 2014 at 08:44 PM 0
Share

Why not use a second camera for displaying the arrow (and any other world GUI objects)? I use EZGUI for my interface work. All the objects are world objects. I use a separate camera for displaying the interface (EZGUI) elements.

avatar image Leucaruth · May 12, 2014 at 01:39 AM 0
Share

Robertbu solution was the best I could find. Simple and effective. Thanks ^^. If you put it as a response I'll make sure to vote it :)

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting low FPS in URP compared to SRP for the same Scene on mobile 0 Answers

2d game performance is bad in mobile, but giving 80 to 130 fps in pc, its physics game, help plz 2 Answers

Sprite renderer, bad perfomance on mobile 1 Answer

World canvas with screen space canvas performance mobile ? 0 Answers

Gui scaling problem 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges