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 /
avatar image
0
Question by Axel121 · Oct 23, 2016 at 10:08 PM · animationcolliderballelevator

ball penetration

I have moving platform made by animation and ball,

platform - rigidbody and box collider. ball - rigidbody and sphere collider.

When i run into moving platform the ball penetrate and fall down. How can i make to ball elevate by platform?

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

Answer by ElGordoGato · Oct 24, 2016 at 05:23 AM

Make sure both rigidbodies are kinetic and the colliders are not triggers. Thats what worked for me.

Comment
Add comment · Show 2 · 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 Axel121 · Oct 24, 2016 at 07:53 PM 0
Share

I set that, but is still not working

platform.png (40.2 kB)
player.png (41.8 kB)
avatar image N1warhead · Oct 24, 2016 at 11:17 PM 0
Share

Don't know why you didn't try what I put. I use it all the time and it does work. Or at least if you did try you didn't say anything.

avatar image
0

Answer by N1warhead · Oct 23, 2016 at 10:30 PM

You can try

 // All you have to do is make the ball the child of the platform
 // Add this to the player
 
 // You might have to do OnCollisionStay
 void OnCollisionEnter(Collision col){
 if(col.gameObject.tag == "Platform"){
 gameObject.transform.parent = col.gameObject.transform;
 //Disable any Components below this that you might need to do.
 //Comp1
 //Comp2
 //Etc.
 }
 }
 
 void OnCollisionExit(){
 //De-Parent our ball from the platform
 gameObject.transform.parent = null;
 //Re-enable any components below this.
 }


If this is correct and works for you, please mark this as correct so others will know. Hope that helped.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

animation Collider 3 Answers

Unity 4.5.2 bug changing the properties of the 2d colliders in animation 1 Answer

How to jump on to a turret gun 2 Answers

Cant play animation once on collision enter then another animation on collision exit? Called multiple times? 0 Answers

OnTriggerStay instead of input 2 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