Hi
Sorry this not helps for my case.
Look, I got a pendulum of an old clock, which swings left and right, by the rigitdbody physics. But I dont want have it touchable by the user. I dont wont, that this pendulum is changing the color by rollover with the mouse. (But in the same scene, there are rigitbody objects to move, and for those the color indication of a movable object is ok)
If i switch the pendulum object to “rigidbody.isKinematic = true;” it is not swinging any more!
Or in your case you could also use a rigidbody without any colliders.
Really, though, if you want it to be entirely non-interactive you should just animate it.
Hi and thanks for the help
Well in this case I just need a script for animating a pendulum. I got that script below from this forum, but it don’t works. It is not swinging but turning around 360 degrees the pendulum:
var Speed = 10;
function Update () {
/*
l = pendulum length
g = accel due to gravity
t = time
var pendulum = pendulum_max*Mathf.Cos(Mathf.Sqrt(g/l)*t)
*/
var pendulum = 10 * Mathf.Cos(Mathf.Sqrt(2/10)Time.smoothDeltaTimeSpeed);
transform.Rotate (0, 0 , pendulum);
}