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 pippo19 · Nov 09, 2013 at 06:36 PM · collisionspeed

problems with the collision speed

I created a ball bouncing between two walls, and each time it bounces gaining speed, but after a while pierces the wall. I think because the ball goes too fast and the unity is not able to calculate the collision. (though for what I want, the ball still goes floor) there is a way to overcome this problem?

Comment
Add comment · Show 1
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 meat5000 ♦ · Nov 10, 2013 at 10:33 AM 0
Share

$$anonymous$$ake the walls (colliders) thicker. Perform physics in FixedUpdate only.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Dave-Carlile · Nov 09, 2013 at 06:40 PM

If you're using Unity's physics you should be able to set a drag value on the rigidbody which will effectively cap the maximum speed. You'll need to play around with the value until you get the effect you want.

If you're moving things manually, you just need to cap the maximum velocity. There are multiple ways to do that but it's hard to tell what's best without seeing your code. One method is to use Vector3.ClampMagnitude on your velocity vector. This will clamp the vector length to a maximum value, which means velocity won't go beyond that value.

Comment
Add comment · Show 3 · 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 pippo19 · Nov 09, 2013 at 07:31 PM 0
Share

unfortunately I'm new to unity and I do not know everything well. what I did is this: alt text

there is this paddle that move me, and the ball goes faster and faster and I moving the paddle I try not to let the ball fall. the ball does not have a script for the speed, I just set the physic material rebound.

alt text

what do you suggest I do?

immagine.png (15.5 kB)
immagine2.png (6.9 kB)
avatar image Dave-Carlile · Nov 09, 2013 at 07:45 PM 0
Share

The "Your Answer" section is reserved for answers to questions. Discussion should be done using the "Add Comment" button under the answer you're discussing. I moved your comment here...

Does your ball object have a rigidbody component? Set the drag property on that to a value higher than 0.

avatar image pippo19 · Nov 10, 2013 at 03:19 PM 0
Share

is my ball has a drag property, but if it imposed greater than 0 the ball goes very slowly, ins$$anonymous$$d I want him to go faster and faster.

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

18 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

Related Questions

How do I increase speed after collision? 2 Answers

Collision isn't deteccted at a high speed 1 Answer

How to get collision force, not relative velocity? 1 Answer

Collision without physical behaviour. 1 Answer

Velocity remains constant even when colliding 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