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 ina · Apr 27, 2012 at 05:41 AM · androidcamerarotationiosgyroscope

Gyroscope smooth transitions (minimizing jerk from tiny movements)

Is there a way to set a minimum threshhold for which the gyroscope input will be recorded?

This is to try minimizing tiny vibrations and jerky motion from disturbing a camera controlled by the gyro.

Comment
Add comment · Show 6
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 Kryptos · Apr 27, 2012 at 09:08 AM 0
Share

You can try to smooth input by using Lerp.

 float fPreviousInput;

 // ...

 fNewInput = $$anonymous$$athf.Lerp( fPreviousInput, fNewInput, Time.deltaTime );
avatar image ina · Apr 30, 2012 at 11:31 PM 0
Share

that makes the motion appear "slow motion"... is there a way to also maintain accuracy or avoid the slowmotion effect?

avatar image Paulius-Liekis · May 02, 2012 at 08:49 AM 0
Share

$$anonymous$$ryptos, why do you post answers as comments?

avatar image Kryptos · May 02, 2012 at 11:10 AM 1
Share

@paulius-liekis I do so when I'm not sure of my answer or when I think it is incomplete.

In this case, I think this is just a hint but not a complete answer.

avatar image Paulius-Liekis · May 02, 2012 at 02:16 PM 0
Share

Fair enough, but your answer might be sufficient for person who is asking and he won't be able to mark is as correct.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Paulius-Liekis · May 03, 2012 at 07:22 AM

Some people use Kalman filters, but I find that overcomplicated - simple Lerps are good enough.

People do adaptive filtering: if new value hasn't changed a lot from previous, then you lerp it a lot with previous, if it changed a lot, then you lerp just a little bit. In such case tiny movement are suppressed, but you still get big movements.

All these methods basically "blur" your data and if you blur too much, then it looks like input is delayed. It's a tradeof between jerkines and delay.

Comment
Add comment · Show 1 · 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
avatar image Kryptos · May 03, 2012 at 08:26 AM 0
Share

@ina To reduce the effect of slowing down, you can use a multiplier inside the Lerp:

 fNewInput = $$anonymous$$athf.Lerp( fPreviousInput, fNewInput, fDamping*Time.deltaTime );

The value of fDamping will depend on your experience with it. Try large values first, close to your game FPS (e.g. 60, 30) then decrease it until you reach a good compromise.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Gyroscope Orbit Android 1 Answer

Phone camera autofocus 0 Answers

Smooth Follow Camera Rotate on Z-Axis? 2 Answers

Gyroscope Tilting Rotation. Quaternions T_T Help. 1 Answer

How do I access CoreMotion and the Android equivalent? 0 Answers


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