Hello all,
I’ve come back to a project and appear to be having some issues when Instantiating game objects.
The issue is that when they are instantiated, they spawn with velocity and are tossed around 10m from the spawn location.
I’ve tried setting velocity and angular velocity to zero after instantiating but does not help.
Troubleshooting
I’ve tested this on a default 3D cube with an added Rigidbody (removing this of course does not result in the “throwing” of the object).
Unity Version: 2020.3.18f1
To show nothing funny going on, the code below is used to spawn the default 3D cube at a fixed position. Script is running on an empty game object, but the “throw” occurs even if I set a Vector3 as a defined location.
void Spawn()
{
var x = Instantiate(spawnObject, this.transform.position, Quaternion.identity);
}
Any thoughts?
Thank you in advance.