• 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 noxerr94 · Apr 26, 2016 at 06:51 PM · rigidbodygravitysphereslidephisics

slide sphere on a slope without rotating

I have a ramp and I move a sphere with arrows. I have unity's gravity and I want the rigid body of sphere to slide when it is stoped at the top of the ramp but without rotating it's body. The problem is if I Freeze rotation on x axis, it won't slide.

Comment
Add comment · Show 3
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 GlatiatorRX · Apr 26, 2016 at 09:09 PM 0
Share

You could try using a physics material, like ice, to make the friction basically zero. This would allow a force on the ball, even without torque, to make it freely slide around.

If that doesn't really do it for you, can you explain more? I do not necessarily know what you are trying to do here, like why do you want to freeze the rotation at the top of the ramp?

avatar image noxerr94 GlatiatorRX · Apr 27, 2016 at 06:00 PM 0
Share

I don't want the ball to rotate because the ball has a texture of a pac man, if the ball rotates it would be like the pac man will get dizzy. I want the effect you said like the ice effect or let the ball rotate but let the texture stay How can I create ice material?

avatar image Cherno noxerr94 · Apr 27, 2016 at 10:04 PM 0
Share

Apparently, you are under the assumption that a Physics $$anonymous$$aterial replaces a Renderer's material, which is not the cause. P$$anonymous$$s are completely different things and have nothing to do with rendering. They are assigned to a collider to change the way the object reacts to other physics objects.

Check the User $$anonymous$$anual for Physics $$anonymous$$aterials.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by GlatiatorRX · Apr 28, 2016 at 05:07 PM

Ok, Ignore my physics material comment. Physics materials are great when trying to add realism or a slide/stop mechanic, but for general ball motion, lets try using joints.

You will need 2 spheres, both the same size, both with rigid-bodies. Overlay the spheres to the same position, rotation, and so on. And child one of them to the other to look like this in your hierarchy:

 Pacman (Stationary)
      InvisibleColliderSphere (Rotates)

Once you have those two spheres, set up their components like this.

alt text

Make sure all the component variables are the same. The only difference is that you will not need to render the child (collider) sphere, so feel free to remove that component. This is the sphere you want to add all your force to, and it will rotate freely, as your PacMan does now. But, this will make it so the parent object (PacMan) will stay stationary. So PacMan will no longer get dizzy.

If you want me to explain anymore or if you are having trouble, feel free to ask. The components should be easy to read, but are sometimes hard to understand.


untitled.png (84.8 kB)
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.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Sphere + rigidbody + character controller 1 Answer

Sphere moves randomly after adding rigidbody! 0 Answers

Movement problem? 0 Answers

How to have a sphere roll/be affected by friction 0 Answers

Rigidbody Sphere slides around when rotating. 0 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