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 Epixam · Jul 02, 2012 at 06:24 PM · androidrotationphysicsdelay

Delay at scene startup

I seem to be having a silly issue and I'm very confused as to what could be the problem. I am using the "Single Joystick" prefab from the Standard Assets (Mobile) package to get input from the user. The joystick moves and will return a value for the movement.

 function Update () {
 
 intensity = GameObject.Find ("SingleJoystick").GetComponent(Joystick).position;
 GameObject.Find ("SHIP").transform.Rotate(0,0,120*Time.deltaTime*direction.x);
 
 atext.text = "Intensity: " + intensity.x;
 }

The script is attached to the "PLAYER" node which is located at the top of the tree that contains the ship, camera, and some effects. The structure is as follows

 PLAYER
     Camera
     SHIP
         Burner
         Burner_Effect


The problem is, for the first 10 seconds that the scene if active, the "atext" will properly output the intensity of the joystick move however the ship will not rotate. That being said, the ship WILL properly rotate after those first ten seconds, and the issue will not occur again until the scene is reloaded.

Perhaps an interesting piece of information is that in another scene with the same hierarchy (In which the "SHIP" node's rotation is different than the "PLAYER" node for a turning effect on the camera) the parent "PLAYER" is able to be freely rotated, while once again the child "SHIP" cannot be rotated for the first ten seconds. In this instance after this 10 second delay has transpired the "SHIP" will rotate properly and correctly until the scene is reloaded.

I cannot for the life of me figure out where the delay is coming from...

EDIT: In attempting to diagnose the issue I added a node that the ship is attached to and instead of rotating the ship I rotate its parent so that the structure is now

 PLAYER
     Camera
     ShipRoot
         SHIP
             Burner
             Burner_Effect

And for some reason it now works perfectly and without delay???? I'm not sure why but I'm just glad it works?

How do I mark this answered?

Comment
Add comment · Show 1
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 AlucardJay · Jul 04, 2012 at 07:04 PM 0
Share

Place your EDIT in an Answer field, then you can mark it as answered from there =]

Just click on the 'Tick/Check' under the thumbs, Next to the Answer ;)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by _EdzUp_ · Jul 04, 2012 at 07:17 PM

One thing I would check on is the delay isnt caused by the Joystick system trying to locate the hardware you have attached, I have had this problem in a C++ program I was working on many years ago it had quite a substantial hit when the user chose to use the joystick mainly because the routines were checking to make sure the hardware was attached. I got around this problem by loading the routines at the start of the game with all the other data this was hidden from the user behind a nice 'LOADING...' screen.

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

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

6 People are following this question.

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

Related Questions

Android screen rotation very slow and my audio keeps going but the graphics stop 0 Answers

Rotation on Android vs. PC 0 Answers

How to set a limit for my player rotation ? 0 Answers

error CS0201 im trying to make cube do not rotate 1 Answer

transform.Rotate and Rigidbody.MovePosition 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