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
1
Question by TenCommander · May 06, 2011 at 01:50 PM · physicspositionmovespecific

Move object to specific position with physics

Hi, I would like to make an dynamic jump pad function where i can input a specific position and have the function dynamically calculate the force and velocity i need to add depending on the declared position. I only need to do this on one axis, I want to drive over the jump pad and have the player to jump and land on the dynamically declared position on one axis - does any one know how to calculate this and add the right physics to make a nice smooth jump? any ideas, thoughts or a solution is very welcome.

/joe

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
1
Best Answer

Answer by DaveA · May 06, 2011 at 08:07 PM

You could read up on basic physics (google it) and see how to do projectile motion calculations. Note that there are many solutions to 'jump from here and land there' depending on the speed and angle of launch you want.

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 umopepisdn · May 08, 2011 at 03:50 AM 0
Share

Pointers to specific articles that describe what you're talking about would be helpful.

avatar image DaveA · May 08, 2011 at 05:32 AM 1
Share

I was gonna say http://lmgtfy.com/?q=projectile+motion+equation but this one looks promising http://electron9.phys.utk.edu/phys135d/modules/m3/Projectile%20motion.htm I think looking for 'range' is what you need.

avatar image
0
Best Answer

Answer by Joshua · May 06, 2011 at 02:28 PM

It would depend on the velocity of the incoming object, it's drag, it's mass, it's physics material's bounciness + drag, the pad's physics material's drag and bounciness and of course the applied force and direction.

Unless there is something I'm forgetting I think it would be way easier to just Vector3.Lerp or Vector3.Slerp the transform of your object to a certain point.


Edit: a solution that would give you total control over the position but will still let it look 'real' (rather then my lerp solution, which would make it move in an unrealistic straight line), is using a spring joint. Have a look at DragRigidbody.js to have a working example. If you can't find this go to Assets > Import Package > Scripts > Select None > Select DragRigidbody.js

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 TenCommander · May 09, 2011 at 12:37 PM 0
Share

i think both answers are good and i will try using a joint today - the optimal solution would be Daves but if im able to use a joint this seems like a lot less work. i will post my solution later - thank you

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

No one has followed this question yet.

Related Questions

Will this code move an object 2 Answers

Vector 3 - move on only one axis 0 Answers

Add force at position with respect to rotation 1 Answer

Rotate multiple objects around or rather move them on the surface of another object 1 Answer

Enemy Jitters when i want him to stop a certain distance 0 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