Bounce Physics of Ball in Unity Game - Alex

In summary, the conversation is about creating a game on unity where a ball rolls and collects coins inside four walls. The goal is to find the equation for the ball hitting the wall and coming back, as well as the speed and angle. The ball has a constant speed of 10 and a mass of 1 kg. It is mentioned that the game is being made on unity and gravity is being ignored. The conversation also includes a discussion on how the ball will bounce off the walls and maintain its angle. Finally, there is a question about how far the ball will bounce after hitting the wall.
  • #1
Alexander Baine
4
0
I am making a game where a ball rolls along the ground collecting coins. The ball is inside four walls. I want to know what the equation for the ball hitting the wall and coming back is. I want the speed and to find the angle aswell. The ball stays at a solid speed of 10 and has a mass of 1 kg. If it helps this game is being made on unity.

Thanks - Alex
 
Physics news on Phys.org
  • #2
Since speed is conserved, you are ignoring gravity too?
Any bounce should maintain that the angle a made with the wall coming in will be the same as the angle leaving the wall.
In 2d, that means if approach angle =a, departure angle = 180-a.
a=0 describes rolling. a=90 is a straight on bounce and return, ie normal incidence.
 
  • #3
RUber said:
Since speed is conserved, you are ignoring gravity too?
Any bounce should maintain that the angle a made with the wall coming in will be the same as the angle leaving the wall.
In 2d, that means if approach angle =a, departure angle = 180-a.
a=0 describes rolling. a=90 is a straight on bounce and return, ie normal incidence.
Ah I see so how would i get the speed of the ball coming off the wall
 
  • #4
You said the speed doesn't change.
 
  • #5
RUber said:
You said the speed doesn't change.
Sorry not speed how far will it bounce
 
  • #6
Alexander Baine said:
Sorry not speed how far will it bounce
If you are ignoring gravity (as you must be in order to have constant speed), it will continue after the bounce until it hits the next wall.
 

Related to Bounce Physics of Ball in Unity Game - Alex

1. What is "Bounce Physics" in a Unity game?

"Bounce Physics" refers to the behavior of a ball or object bouncing in a game made with the Unity game engine. It involves the calculation of the ball's velocity, acceleration, and other physical properties to accurately simulate a realistic bouncing motion.

2. How does Unity handle bounce physics?

Unity uses a physics engine called "PhysX" to handle bounce physics. This engine calculates the forces and collisions between objects in the game, including the ball, and determines their resulting motion and behavior.

3. Can the bounce physics in a Unity game be customized?

Yes, Unity allows for customization of bounce physics through its physics materials and settings. These can be adjusted to change the bounciness, friction, and other properties of objects in the game, including the ball.

4. What factors affect the bounce physics of a ball in a Unity game?

The bounce physics of a ball in a Unity game can be affected by several factors, such as the ball's mass, velocity, shape, and the surface it bounces off of. The physics materials and settings of the objects involved also play a significant role in determining the ball's bounce behavior.

5. How can I improve the bounce physics in my Unity game?

To improve the bounce physics in your Unity game, you can experiment with different physics materials and settings, adjust the ball's properties, and fine-tune the physics calculations. You can also utilize Unity's built-in debugging tools to identify and fix any issues with the bounce physics in your game.

Similar threads

  • Mechanics
Replies
10
Views
2K
  • Mechanics
Replies
6
Views
2K
Replies
5
Views
2K
Replies
22
Views
4K
  • Programming and Computer Science
Replies
11
Views
1K
  • Mechanics
Replies
3
Views
1K
Replies
3
Views
1K
Replies
2
Views
1K
Back
Top