Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
1
Question by Timmcd · Aug 10, 2010 at 04:30 AM · rigidbodyaddforcesphere

Erratic behavior of sphere and AddForce?

I'm trying to just push this sphere around a bit, for my pong clone, but it seems to... not work. The sphere Begins to move left (not right), then move up, and down, and all around. Sometimes it somehow breaks its Configurable Joint constraints and moves out into the distance. I really have no idea what is going on. Probably a rookie mistake, a silly error. We'll see.

I have a prefab with one object it in it, the 'ball'. The ball is just a sphere, with a Sphere Collider, Rigid body (which ignores gravity (on purpose!)), a Configurable Joint that locks movement on the Z axis. Also, this script:

var ball : Rigidbody   
function Start() { ball.AddForce(Vector3.right * 50) }

The ball, like I said above, moves to the left (very slowly) at first, then starts acting all... strange.

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

· Add your reply
  • Sort: 
avatar image
1

Answer by StephanK · Aug 10, 2010 at 05:06 AM

Probably you haven't configured the joint to use worldspace for its constraints, so when the sphere rotates the local coordinate system changes and therefore the constraints change as well.

Comment
Add comment · Show 4 · 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 Timmcd · Aug 10, 2010 at 02:42 PM 0
Share

Hmm... I'm not sure I see what you're talking about. I set the Z$$anonymous$$otion to Locked, and the Angular Z$$anonymous$$otion as well. It bounced back and forth twice before it went crazy tho this time xD

avatar image Timmcd · Aug 10, 2010 at 02:44 PM 0
Share

I locked all the Angular motions, that seems to have done the trick...

avatar image Timmcd · Aug 10, 2010 at 02:56 PM 0
Share

Ahahaha scratch that. It lasts for a bit, and THEN goes crazy ._.

avatar image user-7123 (google) · Dec 05, 2010 at 07:54 PM 0
Share

Cheers that worked, on the configurable joint is a tick-box option called. "Configure in World Space" Turn this on if you have local rotation.

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

No one has followed this question yet.

Related Questions

re-orienting velocity 1 Answer

A sphere moved by relativeforce is acting wierd? 2 Answers

Sphere vs Capsule collider collision resolution 0 Answers

Addforce.forward on a sphere object 1 Answer

multiple spheres spreads out 2 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