• 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 amamateur · Oct 04, 2011 at 10:11 PM · movementbugclothinteractive

Interactive cloth, jittering when attached to a moving object

Hi, I'm new to Unity and have come against a problem using Interactive Cloth.

I'm not aiming to make a player cape, but to simplify my testing that's what i'm doing at the moment.

The problem I find is that (currently using default 3rd person camera & movement scripts) the cloth visibly lags be$$anonymous$$nd the point where it is anchored. If I have it just attached to a cube object, the cube moves around smoothly but the cloth rapidly jumps forwards and backwards a little, kind of like it's always a frame be$$anonymous$$nd everyt$$anonymous$$ng else.

I didn't know if there's somet$$anonymous$$ng I should be doing or whether t$$anonymous$$s may be a bug/limitation?

I've tried to simplify everyt$$anonymous$$ng as much as possible but it's always present. Here's the setup: alt text

I've tried variations on numbers/types of attached colliders, using my own mesh or the default. With the player set up like t$$anonymous$$s, when moving forward, the top of the cloth wit$$anonymous$$n the cube partially jumps out so it's visible what seems like every other frame.

If anyone's encountered t$$anonymous$$s or is willing to quickly try it I'd be grateful for any thoughts on what might fix it. Thanks.

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

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Julien-Lynge · Oct 04, 2011 at 10:45 PM

My guess would be that you have a mix of physical and non-physical movement. Cloth, I believe, moves physically, meaning it uses the PhysX engine to calculate its movement based on velocities, forces, etc. If you are moving the cube non-physically (i.e. by changing the transform directly), that movement happens instantaneously, once per frame, outside of the physics engine. In other words, the cube doesn't actually move smoothly from one position to the next as it appears to you, it moves discretely.

If that is the case, it explains why your cloth is jittering. Try making the cube a physical object by adding a rigidbody and moving it physically rather than by transform.

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
avatar image
0

Answer by Jason B · Oct 04, 2011 at 11:31 PM

Try moving your object via LateUpdate() instead of Update().

Physics objects synchronize to LateUpdate(), so it should solve the problem. However I'm knee-deep in my own project right now so I can't test that theory myself at the moment.

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 angrierpenguin · Jun 08, 2012 at 05:04 AM 0
Share

I think this post and Julien have identified the issue, but LateUpdate() isn't the answer. Physics objects synch with FixedUpdate(), so that might be what you want.

avatar image
0

Answer by amamateur · Oct 05, 2011 at 01:18 AM

Thanks guys, that sounds like it makes sense, although the solutions I tried didn't fix it. I changed the movement script to LateUpdate with no difference.

The movement is applied to a parent object "player" w$$anonymous$$ch contains the cloth, the cube and the attachment colliders. I tried adding Rigidbody to the "player" object, but the whole t$$anonymous$$ng freaked out when I ran it. The cube itself shouldn't affect it, I can remove it alltogether so the "player" only contains the cloth & colliders but the jitter is still there, just not as visually pronounced without somet$$anonymous$$ng smooth right next to it.

thanks

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
avatar image
0

Answer by krides · Oct 23, 2011 at 08:17 AM

Hey, I was wondering if someone has already found solution to t$$anonymous$$s problem. I’ve tried simply synchronizing movement of the cloth and the object it is attached to, w$$anonymous$$ch seems to be solving the jittering part of the problem, but it does add another one.

The t$$anonymous$$ng is, when I move the object with a cloth not attached to it by sync$$anonymous$$ng with it, the end of the cloth attached to the object seems to be sliding on the surface, w$$anonymous$$ch becomes even worse when the fps drops.

In fact, the whole t$$anonymous$$ng seems to be dependent on frame rate, as when the latter drops, the cloth slides further away.

Anyway, could you find a real answer to t$$anonymous$$s question? If you did, I would really appreciate if you gave it to me.,

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 Josh707 · Dec 04, 2012 at 08:08 PM 0
Share

Something about not using an interactive cloth and using the skinned cloth component

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Bug. Player can't move. 3 Answers

Accessing the amount of tear in a interactive cloth. 1 Answer

photon player movement 1 Answer

Player moves slowly by itself? 0 Answers

Input System not executing Unity events 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