Author Topic: 3D GUI lagging behind  (Read 3550 times)

Codewalker

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
    • View Profile
3D GUI lagging behind
« on: April 25, 2014, 03:31:09 AM »
Hello.

In my project I have attached a NGUI 3D GUI to a fast moving object (a spaceship). The main camera is also attached to the spaceship. When not moving, the 3D GUI works as expected, but as soon as I start moving (starting at a velocity of ~20) I cannot use any controls, no hover effects are triggered etc. . As soon as I stop, the GUI works fine again. The ship is moved via a rigidbody and I use 50 physics updates per second. How can I get rid of this lag and use my GUI in flight?

Regards
Thomas

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3D GUI lagging behind
« Reply #1 on: April 25, 2014, 09:18:46 AM »
You should not attach GUI to moving things.

You need to set up a separate camera to draw the GUI. I did that in SGSK (Space Game Starter Kit). One camera draws the spaceship, but the GUI camera (which is separate) is stationary and doesn't move.