• 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 ohyesplease · 4 days ago · rigidbody2dgravity

Why do my rigidbody2d objects appear to be not affected by gravity?

I'm using Unity3d version 2022.1.0f1 on MacOS on a project I began a couple of years ago on a Linux machine.

I am working in 2D and have things with rigidbody2d components. When I play the scene, nothing falls downwards.


I created a brand new minimal project. Gravity doesn't work here either. I created a brand new project. I specified that it should be a 2D project. I added a GameObject>2D Object>Sprites>Circle. I coloured it white. I added components Circle Collider 2D and Rigidbody 2D. All using defaults which include Body Type=Dynamic. I clicked on "Game". Nothing happens. The circle does not move.


Screenshot of simple scene with one object.


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

2 Replies

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

Answer by ohyesplease · 2 days ago

Ah, well, oh dear, this turned out to be a little too obvious for me. For some reason I thought that just clicking the Game window started the game. I didn't even see those tiny Play, Pause and Step icons hidden away under the title bar. All seems to be fine now and I've learnt how to add a debug print to a script and add it to an object.

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 onetimepad · 4 days ago

Check Debug.Log(Time.timeScale); Debug.Log(Physics2D.gravity);

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 ohyesplease · 3 days ago 0
Share

I'm very new to this, but it looks like those things are calls in some programming language. I don't even know if I have a scripting language installed. I tried turning on debugging and looking at Unity logs but nothing looked very relevant.

avatar image Venividiviciuus ohyesplease · 3 days ago 0
Share

Yes you need at least one development environment with a code editor like Visual Studio with Unity resources. You can install it from the Hub or i think in Unity directly from the Package Manager.

So you can add a component in some object you want as a c# script and insert all the codes you need for develop your activities. without I don't think you can get that much. After all, it's all about the scripts.

If this is your first time approaching code development. I suggest you to look at some basic tutorials on C # which is the basic language used on unity .. and some tutorials on the use of the functions of MonoBehaviour which is the main class of Behavior of Unity based C # objects

This is the manual with the documentation that Unity offers us in order to study its services https://docs.unity3d.com/Manual/index.html

avatar image ohyesplease · 2 days ago 0
Share

Thanks, and see my answer to my question. :)

avatar image Venividiviciuus ohyesplease · yesterday 0
Share

Lol :D Good luck my friend

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

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

Related Questions

How to change the gravity scale of the rigidbody 2d back to it's default value after player lands to the ground from jump 1 Answer

,My Character is falling through my Tilemap 0 Answers

Change GravityScale in runtime 2 Answers

Gravity not working in a sidescrolling 2d game after upgrade to Unity 5 2 Answers

Can't find "Use gravity" option in rigidbody2d component 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