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
1
Question by KB73 · May 15, 2014 at 08:42 PM · 2dgraphicsgridgraphchart

infinite 2d grid in an Editor Window

Having trouble with what should be a trivial problem. I have a 10x10 grid rendered into an EditorWindow via GL. I can scroll the grid infinitely and i can zoom it infinitely by multiplying the underlying cells by x2 and wrapping that zoomfactor so it loops back to 1. If i keep the grid at my 'scrolled' origin then it all works great.

If i 'scroll' the grid, the cells 'pop' when they should be smooth everytime the zoom factor loops. So, having realised i needed to apply an offset to compensate for the zoomed origin of the graph, i now have issues with scrolling through it smoothly. It appears to be non-trivial in calculating the cell distance travelled via a modulus.

So...i feel i'm probably going tackling this issue the wrong way and making it more difficult than expected. So the question should be more, how would you do it..so that ultimately it will support framing of a certain region of data and so on and allow the user to smoothly scrolling around, in and out like the softimage editor etc..

Any ideas/insights would be helpful. thanks

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by KB73 · May 15, 2014 at 08:59 PM

Also, there is no 'camera' in the editorwindow so it has to be either manipulation of the GL verts or using Matrix4x4 class and submitting that...both show the same issue. The biggest issue i am having is with the scrolling of the grid. Trying to use something like scrollOffset % cellSize is failing to work when the thing zoomed.....regardless of whether the cellSize is a zoomed or unzoomed value.

Comment
Add comment · Show 2 · Share
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 KB73 · May 16, 2014 at 04:51 PM 0
Share

All fixed, best info i found was in a book online called Practical Charts and Graphs C# and it pretty much addressed everything i needed.

avatar image BiatuAutMiahn · Apr 27, 2016 at 12:53 AM 0
Share

Can I get an example of ur code? I am trying to do the same thing as a part of a bigger project, but I'm having trouble getting started. Ty

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

Unsmooth camera on sprite diffuse 0 Answers

How to make a simple "That's all folks!" effect in 2D? 1 Answer

Unity2D Grid disappears when zooming out 0 Answers

Material is destroying sprite`s quality 1 Answer

Android Build has bad quality 0 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