# Move object to specific position with physics

 0 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 more ▼ asked May 06 '11 at 01:50 PM TenCommander 38 ● 4 ● 5 ● 10 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 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. more ▼ answered May 06 '11 at 08:07 PM DaveA 26.5k ● 151 ● 171 ● 256 Pointers to specific articles that describe what you're talking about would be helpful. May 08 '11 at 03:50 AM umopepisdn 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. May 08 '11 at 05:32 AM DaveA add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 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 more ▼ answered May 06 '11 at 02:28 PM Joshua 6.4k ● 19 ● 25 ● 71 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 May 09 '11 at 12:37 PM TenCommander add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x1882
x888
x500
x49

asked: May 06 '11 at 01:50 PM

Seen: 1702 times

Last Updated: May 06 '11 at 01:50 PM