Hi,
i have this code written for Rigidbody2D, but i need it for a 3D Game (2.5D Platformer)
i tried to convert it , but get errors like cannot convert float' expression to type
UnityEngine.Vector3’
Maybe someone sees the error. Thank you so much
public float bulletSpeedHigh;
public float bulletSpeedLow;
public float bulletAngle;
public float bulletTorqueAngle;
Rigidbody bulletRB;
void Start () {
bulletRB = GetComponent<Rigidbody> ();
bulletRB.AddForce (new Vector3 (Random.Range (-bulletAngle, bulletAngle), Random.Range (bulletSpeedLow, bulletSpeedHigh)),ForceMode.Impulse);
bulletRB.AddTorque ((Random.Range (-bulletTorqueAngle, bulletTorqueAngle)));
}