unity3d - Unity - Matching Speed While Transistioning From Traveling on a Single Axis to Rotation Around a Circle -
i working on simple project consists of ball rigid body being pushed along x axis. ball needs transition 90 degrees , continue straight up.
i've created box serve pivot/rotation point , placed 5 units above beginning of 90 degree transition , 5 units away end of transition. i've created 2 colliders work triggers; 1 @ beginning , 1 @ end of 90 degree transition.
so ball come zooming along on x axis , hit first trigger. when reset ball's velocity 0 , parent ball box serving pivot/rotation point. i've applied angular velocity box ball rotate 5 units around pivot point. when ball hits second collider @ end of transition un-parented , velocity reapplied ball can continue straight up.
so here question; if ball 5 units away pivot point, distance traveled 90 degree transition : 5 * 2 = circles diameter * pi = 31.4 units distance around circle / 4 = 7.84 game units travel entire 90 degree transition.
so how match velocity ball had while traveling solely on x axis has same speed while transitioning using pivot point rigid body's moverotation function around circular axis?
if have velocity vector of (-10, 0, 0) when hit first trigger how calculate feed moverotation function ball, rotating 5 units away pivot point, still traveling @ 10 units second?
taking original velocity (-10, 0, 0) , multiplying distance needed travel 90 degree transition(7.85 units) looks close can figure out how check it.
Comments
Post a Comment