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 siddharth3322 · Apr 18, 2014 at 04:00 PM · animationphysicsspriteunity4.3

Crushy Bird Game Doubt

I have recently downloaded Crushy Birds android game. It is nice game with unique concept. Crushy Birds

After playing this game, I have one doubt in my mind. How to apply birds movement? They are coming from left side of the screen in based on some curve path.

My other doubt is, Is this physics based game of normal one? How to perform this movement in unity?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Kumo-Kairo · Apr 18, 2014 at 06:07 PM

As I can see, there are two paths you can follow:

  1. Apply physics and gravity.

    Every bird has a Rigidbody2D component and a script which forces your bird to flap if it goes below some point, thus creating a curve effect. You should, of course, constantly move your bird forward. You can actually "combine" your velocity vector from two parts - desired horizontal speed and the vertical speed from your AddForce impact (if your bird goes too low)

    pros: you don't have to worry if the movement of your birds are smooth and natural - physics will make it look good, you can also make every bird with a different bottom line, which will create even more randomness

  2. Move with code

    You can also move every bird with code by calculating desired trajectory. In fact, this can also be a abs (sin (time a + b) c) where time is actual passed time of your game, a is a speed multiplier, b is an offset and c is amplitude.

    pros: full control of the movement cons: it may take a while to get all those parameters right, so your birds actually move naturally

I would personally prefer the first choice, it's simple to implement and will be the fastest solution possible

Comment
Add comment · Show 5 · 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 siddharth3322 · Apr 20, 2014 at 08:08 AM 0
Share

Thanks for your reply. If you see game more clearly some birds are moving backward after touching corner of pipe. If I am using first approach then how to perform this or it is normal physics behaviour.

For second approach, why I have to take abs value of result? I already up vote your answer.

avatar image Kumo-Kairo · Apr 20, 2014 at 06:41 PM 0
Share

If you will use physics you can just push the birds with force away from the pipe, they will gradually increase their X speed

As for the formula, we need abs so they "jump" a bit when they reach a zero point in the sinus ins$$anonymous$$d of smoothly floating, you can just look at the plot of the abs(sin(x)) function to get what I mean

avatar image siddharth3322 · Apr 21, 2014 at 07:39 AM 0
Share

Thanks for your help. If I stuck in any situation then I will disturb you.

avatar image Kumo-Kairo · Apr 21, 2014 at 08:56 PM 0
Share

Feel free to write a personal message

avatar image siddharth3322 · Apr 22, 2014 at 03:36 AM 0
Share

@$$anonymous$$umo-$$anonymous$$airo, Thanks for you humble support. You told about personal message but how to send you. There is no feature available for that.

As this link says How to send a private message to another Unity Answers user?

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

How to make a Spring in a 2D game in unity? 0 Answers

Atlas size based on sprite 0 Answers

Terrain Handling For Performance Improvement in 2D Game 0 Answers

Sprite Rendering Cost Calculation 1 Answer

Background Sprite Setting 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