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 Infrid · Apr 07, 2012 at 12:33 AM · physicsitween

integrating itween with physics

I'm essentially trying to use itween to avoid writing (and relearning) a ton of parabolic maths for special kick shots that will move a ball in a certain curve... iTween looks perfect for this, and does save me all the painful maths.. however..

The only thing is that I would love to be able to lob, flat kick, trick shot kick my ball off using itween, and have itween move the ball from my origin point to my taret point, then have the physics engine handle the bouncing once it collides with the floor..

Imagine someone kicking a ball from an arbitary x,z and y zero, to a new x and z point, at y zero. I have a tween that describes this movement. To get realistic physical bounces, I'm presuming once my tween ends, I need to calculate a force to apply to the ball, and then hand the object over to the physics engine, with that force applied.

Does anyone have any idea how to calculate the force to get the realistic bouncing?

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 Maria.and.Irina.Popova · Jun 03, 2012 at 04:48 AM 0
Share

Have you managed to get it done? If yes, could you please post some sample codes please? thank you :)

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by rutter · Apr 07, 2012 at 03:07 AM

Haven't tried it, but you might be able to manage something like this:

  • Attach a rigidbody to the ball

  • Before passing control to iTween, make the rigidbody kinematic (ie: script controlled)

  • While iTween is running, find a way to record the ball's effective velocity (delta position over delta time)

  • When passing control back to physics, assign that velocity and make the rigidbody non-kinematic (ie: physics controlled)

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 Infrid · Apr 07, 2012 at 04:33 PM 0
Share

This is a great and obvious idea.. I don't know how to accept this answer. But I love your clear lateral thinking here.

Thanks

avatar image Ash-Blue · Aug 07, 2014 at 04:20 AM 0
Share

An example of iTween code would really knock this answer out of the park

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Kinematic rigidbody with interpolation issue 0 Answers

iTween's inaccuracy of final position 2 Answers

Character falling through moving object using iTween 1 Answer

iTween not working within OnCollisionEnter? 0 Answers

iTween Path Rotation Problem - Please Help I am Stuck 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