Hi guys
My object follows other object direction. what I need to do is to make this rotation delay for second or two.
transform.eulerAngles = new Vector3(rocker.eulerAngles.x, rocker.eulerAngles.y, transform.eulerAngles.z);
Hi guys
My object follows other object direction. what I need to do is to make this rotation delay for second or two.
transform.eulerAngles = new Vector3(rocker.eulerAngles.x, rocker.eulerAngles.y, transform.eulerAngles.z);
Daily for a second or two? I have no idea what that means.
Side note: It’s good practice and a good habit to prefer Quaternions / transform.rotation I believe when you’re in that habit, you’re less likely to run into (as many) problems, in general.
Daily? Do you mean Delay?
haha. That seems quite likely… didn’t even occur to me. Yikes
OH MY GOOOOOOOOD
Yes, Daily = Delay.
Now, get back to issue please
Invoke with a delay or a Coroutine…
Example please
YourMethod() {
// some code
}
// wherever you call the code..
Invoke("YourMethod",2); // 2 seconds
Or …
void Whatever() {
StartCoroutine(YourMethod());
}
IEnumerator YourMethod() {
yield return new WaitForSeconds(2);
// your code goes here.
}
After I wrote “Invoke or coroutine” you could have looked those up online…
Anyhow, now you have a couple of examples.
Thank you methos5k. I will try it.
No problem. You’re welcome.