Sign in to follow this  

Universal camera reaction slows down without major fps drop

Recommended Posts

Hello, everyone!

I have been struggling with some strange universal camera behaviors.

A simple scene with an arcRotateCamera in the air (left) and a universalCamera (right) on the ground, like this:


The arcRotateCamera rotates very smoothly. No problem with that.

The universalCamera, on the other hand, behaves a bit wierd.

The walking (using arrow keys to move about) is pretty smooth, but the panning (click and drag mouse to look around) gets 'sticky' around the center of the screen, especially when looking at more objects, like the screen capture above.

By 'sticky' I mean the camera is reluctent to rotate, as if there is a big fps drop. However, engine.getFps() shows no obvious fps drop.

I am wondering:

1. If anyone has met similar situations and how to solve it?

2. Does the camera have some sort of inertia property that might result in this?

Hope someone can point me to the right direction.

Thanks a lot!

Share this post

Link to post
Share on other sites

@Deltakosh, thanks for your help. I tried and collision doesn't seem to be the problem.

I guess the camera seems 'sticky' because the amount of panning is more affected by the "speed" of the mouse drag, rather than the "distance".

So when trying to make small panning adjustments, the mouse is dragging slowly because I am trying to carefully aim at something, and the camera doesn't seem to be very responsive.

In other words, as I slowly drag the mouse for a long distance on the screen the camera isn't panning much, and as I loose patience and speed up the drag, the panning also suddenly speed up, resulting in a "jerking" effect. The sudden change from slow to fast makes the interaction feel "sticky".

Hope I am not sounding crazy here.:D

Is it possible to change the panning input from 'mouse-click-drag' to 'mouse-move', like in most FPS games? I would like to test and see if it makes things better.


Share this post

Link to post
Share on other sites

I think I have solved the problem. I tried changing the 'inertia' property of the universal camera from default (0.9 I think) to 0.5 and the 'stickiness' is basically gone. Maybe I am just too sensitive about this.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.