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 Narendra · Feb 05, 2013 at 06:20 AM · logic

How to give Power to Cue Ball in Snooker after stick having collision action on it?

In the game of Snooker, when Cue Ball is not moving, I've made the Snooker Stick to rotate around the Cue Ball to find the hit point over the Cue Ball.

Then, on 'getMouseButtonDown' event, I've given the 'rigidbody.AddRelativeForce' to the Stick, which allow it to collide with the Cue Ball along 'Z-Axis'. This will make Cue Ball to move, but at very lower speed because force was applied to stick and it transfers the force on Cue Ball on collision.

If I increase the power value, i.e., around 40000, then Cue Ball moves very fast that it almost skits when it was hit, then after some distance, it starts rolling.

I really don't know where I'm making the mistake, but I'm quite sure that if Force is directly applied to the Cue Ball, then all will be fine.

But if I'm going to apply force to the Cue Ball, how will I'm being able to find the desire angle, in which I want to play shoot on the board because when force is applied to the 'Sphere' game object along a particular axis, it will rotate and when this object's 'velocity is equals to Vector3.zero'.

So, how we will frame out the next shoot, where we have to find:

  • What is the rotation axis values (x,y,z) of the Cue Ball?

  • How to find the position of Cue Ball to move Snooker Stick to that position where Cue Ball Stop when force is applied to the Ball?

Thanks for your Attention. Looking for some helpful response.

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

2 Replies

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

Answer by robertbu · Feb 05, 2013 at 06:50 AM

Your force issues may be related to the mass and size settings you have for the stick and balls. Start with by "modeling" the object at real size/mass and see what happens. As for applying force to the ball once it has been played, take a look at Rigidbody.AddForceAtPosition(). This will allow you to use the angle and placement of the stick to hit the ball without having to calculate any axis.

You may also have to play games with freezing or damping force in certain directions.

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

Answer by anamzara · Nov 16, 2016 at 07:42 PM

Then, on 'getMouseButtonDown' event, I've given the 'rigidbody.AddRelativeForce' to the Stick, which allow it to collide with the Cue Ball along 'Z-Axis'. This will make Cue Ball to move, but at very lower speed because force was applied to stick and it transfers the force on Cue Ball on collision. Mahjong

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

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

11 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

Related Questions

accessing a variable from one script in another with Unity 1 Answer

Collider for road track in Unity3d car tutorial 0 Answers

how can i parse xml through API in unity please can anyone explain with some example. 2 Answers

GUI.Textfield in unity. adding a "what's on your mind" like function 1 Answer

I have two buttons in my c# script, i want to make invissible one button and make it vissible on click of another button at runtime. Can anyone please show me the way for the proper solution. 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