[Tutorial]Astroid Unexpectedly Changes Position while rotating[Space Shooter],[Tutorial Help][Space Shooter]Astroid unexpectidely Changes Posistion While Rotating
Hi I am Very new to unity and can't seem to find a solution to this problem I have searched high and low but can't find an answer I also tried asking on Reddit but I could find the solution there as well
link:here the link to the Reddit post with the video
As you can see in the above video at the Reddit post the astroid unexpectedly changes its positions upwards earlier it would change its positions downwards but I cannot identify the exact cause of the problem
It is possible that the problem is in the RandomRotator Script but I don’t think so because I have borrowed the codings of it heavily from the done_RandomRoatator Script that was provided in the tutorial
I think the problem is between the capsule collider and the RandomRotator Scrip as disabling either one of them cause the problem to disappear but I think the problem is more with the capsule collider as changing the size of the collider changes where the asteroid warps up or down
The Code I am using for RandomRotator
using UnityEngine;
using System.Collections;
public class RandomRotator : MonoBehaviour {
public float tumble;
void Start ()
{
GetComponent<Rigidbody>().angularVelocity = Random.insideUnitSphere * tumble;
}
}