- Home /
Quaternion - Stuck at rotating past 180 - Use: Pendulum that rotates with user input
Hi!
I'm trying to write a pendulum that rotates with user input.
The pendulum is a child of another object. I use the parent to place the pendulum in World Space and set it's direction. The base of the pendulum is thus placed at the same point as the parent object, and is 10m long.
I have a working code with rotational gravity. It works fine. Except that the pendulum doesn't rotate a full loop, instead, it stops at 180.
Analogy: 180 = 12:00: coming from 11:55, it doesn't rotate to 12:05. Instead it stops at 12:00, even with it's angular acceleration pushing it forward. Same goes rotation counter-clockwise.
Here's the code I have working: (I attached a picture because I don't know how to paste formatted code)
1: Uploaded with ImageShack.us
Any help is greatly appreciated. I'm cracking my head over this for the past week... @_@
Thanks!!!
For reference, this is a duplicate of http://answers.unity3d.com/questions/18023
Code is automatically formatted (just select the code, and press the button with 0s and 1s on it).
Answer by raiky · Sep 27, 2010 at 02:16 PM
Are you including the term: speed by time (wot)? I see that's missing. Acceleration for 180 is 0, and the pendullum remains if no speed.
Answer by Frip · Apr 01, 2012 at 10:00 PM
I've been trying to implement the speed by time component for this and I'm having a hard time knowing where to start. Any help would be appreciated.
Your answer
Follow this Question
Related Questions
Constraining 2D movement to polygon surface 0 Answers
Adobe support WebGL, When Unity3D makes it too? 2 Answers
Ramp gravity 0 Answers
How to create a button on iPhone Unity? 1 Answer
hide and show gui texture problem 2 Answers