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 Rosonator · Oct 16, 2012 at 02:05 PM · physicsgravityballstopstops

Losing the gravity physics when stopping

Hi there!!

The project I'm currently working is not my first Unity project but this is the first time I ask anything here. Now I've started working in a ball-labyrinth moved by an accelerometter. The problem is this:

I've developed a provisional way to move the stage with buttons. Those buttons just move the stages rotation.

But the problem is about the ball. When the ball falls into the stage, I can move it properly by rotating the stage, and everything goes okay... unless the ball stops. Once the ball stops seems to lose its physics (if I lift it the ball "floats"), and even the stage breaks through the ball when I move it. For this reason, I must give to the stage an starting tilt of 1 grade, because if I let the ball stops (or start sttoped), my game's over eheheh.

I hope my explanations have been good enough. I would swear that is not any scripting problem because I haven't develop any specific physics script for the ball yet.

Thank you so much in advance,

Alex.

Comment
Add comment · Show 7
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 · Oct 16, 2012 at 03:02 PM 0
Share

$$anonymous$$ight be related to physics sleeping. Some object go to sleep (i.e. physics is not calculated anymore) when they are not moving. But normally they are awaken upon collision or when forces are applied to them.

avatar image Rosonator · Oct 16, 2012 at 03:13 PM 0
Share

I was waiting for an answer... and the answers were already given.

Well, yes, its a 3D stage, filled with colliders, and a Rigidbody in the ball. Sounds that what $$anonymous$$ryptos has explained might be possible.

The point is that I don´t apply any force to the ball. I rotate the stage.

I did one proof: When the ball has already stopped, I sink the stage, manually in the SceneView, and the ball remains in the air, flying. If I lift the ball, ins$$anonymous$$d, the ball "awakes" and falls. ¿What should I do to "awake" the ball? Could be the problem that when I rotate the stage I cut the ball with it?

avatar image Kryptos · Oct 16, 2012 at 03:28 PM 0
Share

I would suggest not moving/rotating the stage at all. You can simulate it by rotating the view of the camera and changing the direction of the gravity.

This may prevent the stage from cutting the ball. And I think it will be more stable.

As for the sleeping part, check the documentation.

avatar image Rosonator · Oct 16, 2012 at 03:30 PM 0
Share

¡¡I got it!!

Thank you so much, both of you. That was the point, the rigidbody was "sleeping", just a simple WakeUp!! WakeUp!! Uoooo! WakeUp!! WakeUp!! Uoooo000

Well, in any case I will answer your answers: 1) No I didn't. 3) With "cut the ball" I meant to cross the ball with the plane that represents the floor. 4) Could be that "stage" isn't the properly word. Sorry, I'm Spanish and I do the best I know :P. With stage I mean the floor, the walls, and everything that composes the labyrinth.

So, thank you so much. From now on I'll be here to see if my knowledge is enough to help anybody else. ¡Take care!

avatar image Rosonator · Oct 16, 2012 at 03:41 PM 0
Share

Yes, I'd love to do that, but I can only mark $$anonymous$$es as answer. And yes, I wonder why the ball falls asleep, but the idea of kryptos links the accelerattor to the gravity and maybe is more complex. I will think on it anyway.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Kryptos · Oct 16, 2012 at 03:44 PM

Answer was given in comment. Here is a short review.

Might be related to physics sleeping. Some object go to sleep (i.e. physics is not calculated anymore) when they are not moving. But normally they are awaken upon collision or when forces are applied to them.

You can force a rigidbody to awake with Rigidbody.WakeUp. See RigidbodySleeping for more information.

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

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

11 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

Related Questions

My object is falling through the platform 1 Answer

Why does a rolling ball not accelerate past a slow speed? 1 Answer

Constant force, with gravity, and correct collisions. 2 Answers

Bouncy Ball Game 1 Answer

Horizontal gravity physics on 3d game 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