• 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
Question by Castino · Oct 16, 2011 at 03:37 AM · physicsgravityballbounce

Bouncy Ball Game

Hi folks, I'm trying to create a game where a player has to keep a ball bouncing up and down while having control of a paddle. It's a little like BreakOut apart from the fact that I would like the player to have to play keepy-uppy with the ball and dodge falling objects.

As an example of how the game would start off; the ball will fall at a fairly slow pace of say, 1 (using gravity, but if you can think of a better way then please, let me know =]) and when the player hits the ball with the paddle, it bounces back up. Once again this would still be at a fairly slow pace but goes quite high (around 5 units on the Y).

As the game progresses I would like the gravity to be higher, so about 10 near the end and the force from the bounce to be smaller so the ball doesn't bounce as high so it can come down faster.

I've tried a few different way of doing it and each time something else goes wrong. using the bouncy physics isn't very good for this because it only increases the height of the ball as it bounces and I can see no way to make it the opposite...unless I have missed it somewhere.

Any help is most welcome and it can be written in C# or JS.

Regards,

Cas

Comment

People who like this

0 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 syclamoth · Oct 16, 2011 at 03:51 AM 0
Share

I wouldn't use physics for this kind of game. It'd really be simpler to either write your own simplified physics engine or just use transform.translate with basic collision detection. As for the gravity thing, I don't quite understand what you're talking about- the force from the bounce is directly proportional to the incident force! If it strikes the paddle harder, it will naturally bounce higher. Unless, of course, you are using some kind of exotic physics.

avatar image Castino · Oct 16, 2011 at 07:50 PM 0
Share

Ok, cheers. With regards to the ball bouncing higher; I meant that if I used the bouncy physics and dropped it from a height of 5 it would bounce back to 5, second bounce = 5.2, third bounce = 5.4 and so on. Surely if something is dropped it will lose height for each bounce it does, not gain height unless it has extra forces added to it on the way down....

avatar image syclamoth · Oct 16, 2011 at 11:36 PM 0
Share

That's what I thought... If you turn the bounciness down, it should act more naturally.

1 Reply

  • Sort: 
avatar image

Answer by morrison · Oct 17, 2011 at 06:56 AM

I actually just got a book for class called Unity 3D Game Development by Example that teaches you how to make the exact game you want to make. It's actually pretty basic and fun to make.

Comment

People who like this

0 Show 0 · 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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How To Make Ball Bounce On Touch 1 Answer

My object is falling through the platform 1 Answer

Simple peggle type ball physics 1 Answer

How could I make a bouncy object move mostly along the Z axis? 1 Answer

Ball bouncing up after rolling over a cliff when it should be rolling down? 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