animation simple pendulum and double pendulum
I want to make two cylinders rotate as if they were rigid bodies to give more realism to the model, to create the two cylinders and trying to connect the first with the pivot only get it to stay fixed on the part of the sphere the other end moves , I searched the internet and did not look for the answer, I already used the commands: transform.rotation, transform.Rotate, etc. What I'm looking for is to manually make the movement or draw a line from the starting point to the end with the equation of distance between two points to be able to connect both rods in their corresponding positions. Thank you I leave a video to understand better what is happening with my animation: https://www.youtube.com/watch?v=VbZhoMHXwwk&feature=youtu.be
P.S. my code in the script of the first cylinder is the following: x1 = l1 Mathf.Sin (T1); // coordinate on x of the rod 1 y1 = -l1 Mathf.Cos (T1); // coordinate on y of the rod 1 // distance between two points (from origin to mass 1) // posx1 = (Mathf.Sqrt (x1*x1)); // posy1 = (Mathf.Sqrt (y1*y1)); posx1 = (l1 Mathf.Sin (T1)); // distance in x of the rod to the origin posy1 = (l1 / 2) - (l1 Mathf.Cos (T1)); // distance in y from the rod to the origin transform.localPosition = new Vector3 (posx1, posy1,0.0f);
Answer by robin_julio004 · Apr 18, 2019 at 08:18 AM
Después de estar en la semana de vacaciones me dispuse a seguir viendo el proyecto del péndulo doble, ya hice que se moviera la varilla 1 pero no se mueve a la misma velocidad que la esfera, alguna consideración que deba tomar?
P.D. las ecuaciones que utilizo son de control, es el modelo matemático del péndulo doble en variables de estado.
solve problem/problema resuelto link del video: https://www.youtube.com/watch?v=gpwiXmWTL3Y&feature=youtu.be
Your answer
Follow this Question
Related Questions
Get when animator change state 0 Answers
I need help writing a script that triggers a character animation when entering a collider 0 Answers
Move to next animation with clicking the game object 0 Answers
Help please! Legacy AnimationClips are not allowed in Animator Controllers. 4 Answers
Can you use a character controller in a coroutine? 0 Answers