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 Cypras · Jan 15, 2014 at 05:41 AM · physicsgravityballcollision event

Constant force, with gravity, and correct collisions.

Hi,

I am looking for a way to have a constant force or velocity applied to a ball, as well as gravity that when it collides with a wall, it bounces off just as it would in real life.

I have tried a whole number of ways, such as setting the velocity to a speed every fixed update, this yields an unrealitic collision response when colliding with a wall.

I've also tried adding a force every fixed update, this still doesn't produce realistic collisions off the wall, on a slight angle the ball slides along the wall, rather than bouncing off.

How would I create a ball, that maintains a constant speed, that reacts to gravity, and bounces off walls realistically?

I'm stumped.

Thanks!

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 robertbu · Jan 15, 2014 at 05:41 AM 0
Share

Have you set the physic materials of the colliders?

avatar image united4life · Jan 15, 2014 at 05:47 AM 0
Share

Try adding physics material to the collider. Tweak values accordingly.

avatar image Cypras · Jan 15, 2014 at 05:51 AM 0
Share

I've already got a physic material to the ball with 0 frictions, and 0.45 bounce.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by morbidcamel · Jan 15, 2014 at 06:15 AM

Hi I recommend understanding physic material better. http://docs.unity3d.com/Documentation/Components/class-PhysicMaterial.html

Also, make sure you are using proper colliders and your rigid body is configured correctly.

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 united4life · Jan 15, 2014 at 06:26 AM

I added physics material to the collider with bounciness = 1 and it is working fine. Make sure the hitting object should have rigidbody attached.

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

20 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

Related Questions

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

Planet gravity help need guidance no code 1 Answer

Bouncy Ball Game 1 Answer

Faux Gravity Prolem? #2 2 Answers

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