Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera movement not smooth when Tracking object #9

Open
SirePi opened this issue Mar 13, 2018 · 3 comments
Open

Camera movement not smooth when Tracking object #9

SirePi opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
🔼 v3 The issue is here, but is relative to v3. To be assesed again once Duality v3 is released

Comments

@SirePi
Copy link
Member

SirePi commented Mar 13, 2018

Not sure if this is due to high speed tracking or not.
The test project included features a free falling rigidbody and the camera tracking it; it's possible to see some "jumps" that appear randomly, in addition to some sudden changes in velocity that shouldn't happen due to not having anything to stop the body's fall.
In addition, the source code ported to v3 is included as well.

CameramanTest.zip
duality-companion-v3.zip

@ilexp
Copy link
Member

ilexp commented Mar 13, 2018

It seems there is a bug in VelocityTracker here, because velocity is determined as a framerate-dependent value, rather than an independent one as it was done in v2 Transform. The value needs to be divided by TimeMult.

However, even with this fix, it's not an exact solution (especially in varying framerates like in the editor sandbox) and shouldn't be relied on for backtracking object positions to previous frames or similar calculations.

Not 100% sure, but I think varying framerates might be what causes this, as I can reproduce the behavior you described in the editor, but not in a VSynced test run in the launcher.

@ilexp
Copy link
Member

ilexp commented Mar 13, 2018

Pushed a fix to develop-v3.0, the velocity values should now again be framerate-independent.

@SirePi
Copy link
Member Author

SirePi commented Mar 14, 2018

From the launcher it looks way better; also I automatically add a VelocityTracker to the Camera (if needed) to use its smoothed Velocity calculations.
For the moment I believe this can be put aside, just leaving it open to remind myself to look at it once Duality v3 is stable.

@SirePi SirePi added the 🔼 v3 The issue is here, but is relative to v3. To be assesed again once Duality v3 is released label Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔼 v3 The issue is here, but is relative to v3. To be assesed again once Duality v3 is released
Development

No branches or pull requests

2 participants