Little confused here. Basically I have 2 cannons firing balls at each other. The cannon balls are instantiated prefabs and all worked well. Both of the cannon ball prefabs were so close in code I decided to create 1 prefab for both cannons to use. The new script for the common use prefab uses If() else to determine which side is firing.
But I noticed that once a prefab was instantiated, fired and even destroyed, and the FixedUpdate() was never called again for any new instantiated prefabs of the same object? I used a print function verify this.
void FixedUpdate(){
print("Magic - Gravety: " + gravity + "Wind: " + windSpeed);
_rb.gravityScale = gravity;
_rb.AddForce (new Vector2(windSpeed, 0)); // this adds wind resistance
}
The problem that I am having is that they new prefab that shoots the same ball for both sides is not updated for the other side so it is not firing correctly.
Im reading documents but if someone can explain why FixedUpdate is called once, that would be great.