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 VIPINSIRWANI · Aug 21, 2013 at 09:28 AM · rigidbodygravity

How can i make my object like bouncy on finger move?

Hello Everyone actually i making 1 game like ball will go bounce in Y direction like we have to swipe and ball will come automatically down then agin we will move our finger to move ball in Y direction....

I am using gravity -1 in y direction`void Update () { if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) { //ball.rigidbody.isKinematic = false; //ball.rigidbody.useGravity = true;

         Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
         ball.transform.Translate(0,touchDeltaPosition.y *speed * Time.deltaTime,0);
         //cam.transform.Translate(touchDeltaPosition.x * speed,touchDeltaPosition.y * Time.deltaTime,0);
         //Debug.Log("X side value..."+touchDeltaPosition.x * speed);
         Debug.Log("Y Value...."+touchDeltaPosition.y * Time.deltaTime);
     }
 
 }`, or i am using code which i paste below..The problem is when i am swiping my ball in y Direction on that time it working but after some time ball coming down very fast.. I don't know why it is coming down like that? 
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 mattssonon · Aug 21, 2013 at 09:36 AM 1
Share

Please format your question properly.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Xtro · Aug 21, 2013 at 01:50 PM

Set the collider material to Bouncy. You must install the physics materials from default unity packs.

Comment
Add comment · Show 1 · 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 VIPINSIRWANI · Aug 22, 2013 at 04:35 AM 0
Share

i can not use physics material because my ball is not colliding with any collider i am swiping my ball on the base of my finger swipe....The main problem is its looking like gravity in -y direction is going high after some time but when i am printing value of gravity it's co$$anonymous$$g fine..

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

17 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

Related Questions

Gravitational pull without losing speed 1 Answer

RigidBodys Suddenly Heavier 1 Answer

Turn Gravity on when collision occurs 1 Answer

Gravity inside a space ship 1 Answer

Rigid body speed not increasing. 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