Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 deepkick · Jul 07, 2011 at 04:22 AM · 2dmouseisometric

2D Isometric Game Setup

Hi all,

I have just started using Unity and have a couple of questions about 2D isometric game setup. The game contains an isometric grid, assets will snap to the grid cells. Pretty standard.

I have two cameras:

Camera 1 is for showing assets in flat 2D world. It is top-down orthographic with no rotation or transformations.

Camera 2 is for tracking mouse movement on the grid. To do this, I set up an empty game object with isometric transformations (using: http://answers.unity3d.com/questions/12027/how-to-do-a-camera-that-is-top-downisometric.html). Inside the container game object is a camera and a plane used as the isometric grid. The camera culling mask is set to only show the grid. Attaching a mouse handler script to the plane allows me to easily track when the mouse is over the grid.

Does this seem like a good way to do the isometric grid mouse interaction (e.g. to tell if the mouse is over the grid or not)?

Also, when converting the mouse position on the grid from screen to local with:

 mousePositionWorld = Camera.main.ScreenToWorldPoint(Input.mousePosition);
 localPoint = Camera.main.transform.InverseTransformPoint(mousePositionWorld);
 

the origin (0,0) of the grid is in its center. Is there an easy way to make the origin the top left or bottom left of the grid?

Thanks in advance.

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

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

2 People are following this question.

avatar image avatar image

Related Questions

Isometric projectile collision 2D or 3D? 0 Answers

Clamp a mouse around several 2d objects 1 Answer

Why Rotate player toward mouse direction keeps increasing rotation speed? 1 Answer

Isometric Character Question 0 Answers

How can I create diablo 2 like characters? 1 Answer


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