Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Heemrad · Sep 22, 2016 at 05:00 AM · collisionmovementphysicscollider

Realistic Soccer VR

Hello everyone,

Im a newbie at Unity and recently got the awesome opportunity to play around with the HTC Vive. Im in the process of trying to make a realistic Vive soccer game where the controllers act as the feet (weird i know).

The problem is i cant create realistic collision between the controller and the ball. The Controller has a box collider attached with a rigidbody and a mass of 1. While the soccer ball has a sphere collider, rigidbody and a mass of 0.5. Ive been playing around with the rigidbody values such as mass and drag but to no avail. Im all out of ideas on how to create a realistic interaction between the ball and the kick. Frankily i dont know if im just being stupid at this point, i took a look at the Newton VR scripts (http://www.vrinflux.com/newton-vr-physics-based-interaction-on-the-vive/) for a possible answer but the physics rely on the ball being attached to the controller not impacting the controller. Please any help, tips or advice will be greatly appreciated. Im really stuck at this point.

Comment
Add comment · Show 2
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 rmassanet · Sep 22, 2016 at 05:28 AM 0
Share

How is what you're getting, not realistic? $$anonymous$$aybe you need to add some drag to the ball...

avatar image Heemrad rmassanet · Sep 22, 2016 at 09:05 AM 0
Share

So currently when the box collider attached to the Vive controllers interacts with the ball there is a lag, as well as the ball doesnt travel at the correct speed and velocity that is equivalent to the power of the kick.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by rmassanet · Sep 22, 2016 at 10:30 AM

It's hard to say without know Vive myself. But I'm guessing that the controllers are moved using transform.position and transform.rotation instead of using rigidbody.velocity or applying forces.

That makes physics calculations totally unreliable. If you want collisions to be realistic, you should move objects by applying forces (or setting velocity) to their rigid bodies.

Comment
Add comment · Show 3 · 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 Heemrad · Sep 22, 2016 at 10:58 AM 0
Share

To both the rigid bodies on the controller and ball?

avatar image rmassanet Heemrad · Sep 22, 2016 at 01:21 PM 0
Share

Well, I was assu$$anonymous$$g you were not moving the ball directly, but it moved as a consequence of its interaction with the controllers. If you do move the ball, do it through its rigibidbody too.

By the way, you should also apply physical materials to objects, if you want them to behave in a more realisitic way. Go to Assets > Create > Physics $$anonymous$$aterial. Create a material and set its properties as you wish. Then assign it to the collider of each object.

avatar image Heemrad rmassanet · Sep 22, 2016 at 04:57 PM 0
Share

I did set the physics material of the ball to behave bouncy, thanks for the tip i will try it out.

avatar image
0

Answer by Heemrad · Sep 23, 2016 at 08:31 AM

@rmassanet So currently the problem is not the two objects interacting and behaving appropriately, it is the collision of the controller interacting with the soccer ball at speed. Currently if i move the controller at speed to collide with the ball, hoping the momentum of the controller (kick) causes the ball to fly in the appropriate direction but instead the ball doesn't move at the appropriate speed, sort of jitters and gets stuck then starts rolling away slowly.

The collision between the two objects does not happen seamlessly, like a real life kick to a soccer ball should. It seems the collision detection isn't accurate or fast enough? Any ideas?

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 rmassanet · Oct 03, 2016 at 08:57 AM 0
Share

Please, don't post a reply to my answer as another answer. If you do that, I might not get notified of the update.

How are you moving the controller with speed?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Not using GetComponent during OnCollisionEnter or OnTriggerEnter 1 Answer

Rigidbody sticks to wall 0 Answers

Rigidbody bouncing off other rigidbodies 0 Answers

Ignored colliders still interfere with physics simulation. 1 Answer

How can I make an object moving on its own bounce off walls 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