プロフィール

登録日: 2022年8月30日

プロフィール

rigidbody.addforce not working

Rigidbodies are used to link or attach one object to another allowing the simulated object to deform under normal forces. Most rigidbodies use an addForce method which adds force to an object based on their location. If the force is not applied correctly, an error could be thrown and this may result in unexpected behavior when using it.


rigidbody.addforce not working

//Even though Unity says that transform.forward = Vector3(0, 0, 1) that is not the case //This is the line that you want gameObject.GetComponentOfType<Rigidbody>().AddForce(transform.forward * 200,ForceMode.Impulse);; //This line will give you seemingly random values gameObject.GetComponentOfType<Rigidbody>(). AddForce(new Vector3(0, 0, 200, ForceMode.Impulse);

Rigidbody.addforce Not Working ABakhsh

その他