'Cinemachine camera having insane velocity and falling through floor
So I am having an issue with cinamachine.
I am attempting to have the cinemachine follow an instatiated target, but when I create the target, the camera goes off into neverland and falls down through the floor like it has a rigidbody on it. Any ideas or help?
the goal is to have it follow whatever I shoot out of the canon.
public void Fire(InputAction.CallbackContext context){
if(context.performed)//if(context.performed && aliveCount == 0)
{
GameObject ball = Instantiate(ammoPrefab, firePoint.position,
Quaternion.identity);
cBrain.LookAt = ball.transform;
cBrain.Follow = ball.transform;
aliveCount = 1;
Rigidbody[] rb = ball.GetComponentsInChildren<Rigidbody>();
print(rb.Length);
foreach(Rigidbody r in rb)
{
r.AddForce(initialVelocity, ForceMode.Impulse);
}
print("Shoot");
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
