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 David_29 · Jan 07, 2016 at 10:23 PM · rotationtransformscaletranslationmeasure

Translating measurement in rotation speed and game object size to non-technical staff

I have questions I would like to know regarding unit size in Unity 3D to human measurement unit. Here as follows:

  1. My boss wants me to translate the size of the GameObject in cm, inches, or meters. I find it impossible yet and the only thing I could do for programmers like me is size relative to the screen regardless of the resolution and DPI. Also, there is another case that there is a large GameObject with the transform scale is 1 and the small GameObject ones but with the scale of 1 too. What should I do? I am revising the game stage editor that I've created in scene file so that when my boss checks my edited level and he needs to ensure the exact measurement without guessing since I usually do "duct tape" some quick fixes and adjusting size by uncertain numbers like the size of the object is 1.25f. The closest possible something is...let's say, "Sir, the size of that object thing is 1/3 of the screen," or something. But, I'm looking for other possibilities to make the reference of the measurement easier.

  2. Also, next, my boss asked me for a specific speed of rotation of a big dot in Z-axis. Taking measurement on how fast the rotation is via RPM. I took some research for this code (or should I say "the formula?") as I shown in below from Unity forums website to check for update changes of the big dot's rotation speed. I revised it according to my preferences and put it onto OnGUI() for updates everytime. But the result is zero (I simply get from the RigidBody 2D of this bigdot but instead I get the GameObject of this body instead) but the rotation is on going while playing. Did I made mistake or something? If yes, what would be the cause? Aside from zero RPM issues, I check the value of the current and previous degree and I found out they both have the same values instead where my expectation is that whatever the order of the code and must be appeared as different values..

Here's the code I've made from question #2:

 // Get the game object of the 2D rigid body.
 GameObject round = body.gameObject;
 
 // Get the current degree.
 currentDegree = round.transform.eulerAngles;
 
 // Compute the RPM.
 float degreePerSecond = Mathf.Abs (currentDegree.z - previousDegree.z);
 
 // Obtain the RPM and update previous degree vector. (Euler Angle)
 float rpm = 0.166666666667f * degreePerSecond;
 previousDegree = currentDegree;
 
 // Display result.
 status.text = "RPM: " + rpm; // --> Still 0 RPM while still moving.
 
 // Before run, the status would be "RPM: ? ? ?"
 // When running, the status is still "RPM: 0" even if it's spinning.


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

Moving objects together without parenting 5 Answers

How do I replace an old gameObject with a new one while keeping the functionality of the old one?,How do I replace my current gameObject with a new one while maintaining the functionality of the old one? 2 Answers

Aligning a transform according to two different positions and directions 1 Answer

[solved] Get upward orientation of object and add scale value 1 Answer

postion scale and rotation greyed out and not working 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