Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rb: Rigidbody;
- var speedY : float;
- var speedZ : float;
- var torque : float;
- function Start(){
- rb = GetComponent.<Rigidbody>();
- }
- function Update(){
- rb.AddTorque(transform.up * torque * speedY);
- }
- function FixedUpdate(){
- rb.AddTorque(transform.forward * torque * speedZ);
- }
Advertisement
Add Comment
Please, Sign In to add comment