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 /
This question was closed Sep 01, 2013 at 11:13 AM by Hoeloe for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Hoeloe · Aug 31, 2013 at 10:49 PM · rigidbodyhingejointtime.timescalesleepnan

Cloth causes "position assign attempt is not valid" when changing timeScale

So, I've created a simple rope using HingeJoints, so I can have the rope react to physics in the environment. It is made of 9 connected Capsules, each of which has a HingeJoint and Rigidbody attached. I have also created a pause system, that allows the entire game to pause by setting the Time.timeScale to 0 (the error does not occur when setting it to higher values than 0). My issue is that, after pausing and unpausing the game, I get this error:

 transform.position assign attempt for 'Capsule' is not valid. Input position is { NaN, NaN, NaN }.

This error appears every frame, 9 times (one for each capsule in the rope), and the debug messages instantly slow the game down. Looking up this problem, I found that joints in general are apparently difficult to "stop" and "start" again. I read that the correct thing to do was call rigidbody.Sleep(), to ensure the physics is halted correctly. I built a system using event listeners, so I could attach a script to call this method, that would be fired by my pause script, but this achieved nothing, and the effect still occurred. Could anyone help me work out exactly what is wrong here?

EDIT: On further inspection, it seems the issue is not with HingeJoints. The rope has a flag attached to it, which is simply a plane of InteractiveCloth. If I disable the cloth, everything works perfectly as expected.

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

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Hoeloe · Sep 01, 2013 at 11:11 AM

I fixed the issue! I determined it was the cloth that was causing the problem, not the joints, so I used the listeners I set up to disable the cloth component before pausing, an enable it after pausing. This solved the issue perfectly.

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

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

hing joint issue,Hing Joint Issue in tow truck 0 Answers

How to make an arm with multiple, controllable joints? 2 Answers

need help in rigid body sleep 3 Answers

HingeJoint motor force behaviour 0 Answers

Attaching rigidbody to a HingeJoint via C# 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