Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Denisowator · Nov 28, 2016 at 08:03 AM · coordinateschild objectlocalglobalparent and child

Make everything use "world space" coordinates?

So I'm making a side-scrolling platformer, which is obviously going to involve a lot of game objects, as a single game object is going to be a single tile. So there's easily going to be 500+ objects per scene (level). And don't worry, I used the Sprite Packer in order to decrease the number of batches being called.

The problem I'm currently facing, is that to make it cleaner in the hierarchy, and easier to navigate, I have to make empty game objects, which I used as parents for all the moving platform parts, tiles, enemies, coins, etc. (a parent for each). And since the tiles and platform parts become children objects, they now have local coordinates.

This didn't become a problem, until just now, as I'm starting to implement moving platforms. And the way I did it, is make an empty game object, with a script that is controlling where it moves to, and its children are all the parts for that corresponding moving platform. (everyone with me so far?)

And what happens, is since the parts are children, they just move along with it, and I don't have any problems while testing the level. What I have problems with, is setting up the points, to which the platform will move.

And since the empty object is using global coords, and the platform parts are using local, it's really hard for me to align the two together. This is because I'm snapping the tiles (platform parts) together with "V", which I can't for some reason do with the empty object. This means the empty object is always slightly above or below, or to the sides of the platform parts, and I have to fix it manually. The reason I need the empty object and the platform parts to be at exactly the same position, is because the script I'm using to move it around, creates points centred on the object. So if I had it 2 units to the left, the parts would move 2 units more than they're supposed to.

So is there any way, I could just make every single game object in the project or scene, use global coordinates regardless of whether it's a child of something or not?

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Maya objects with different transforms. 1 Answer

Child coordinates misunderstanding. 0 Answers

How can Use Child Local Position 1 Answer

Problem with world coordinates in scripts? 1 Answer

How to open and close a door parented to a rotating object? 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