Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using Wow;
- namespace Wow {
- public static class Global {
- public static int wow = 10;
- }
- }
- public class WASDMove : MonoBehaviour {
- public float speed = 100f;
- //int rotatespeed = 1800;
- void Start () {
- //transform.Translate (new Vector3 (0, 10, 0));
- }
- void FixedUpdate () {
- Rigidbody rbd = GetComponent<Rigidbody>();
- float horz = Input.GetAxis ("Horizontal");
- float vert = Input.GetAxis ("Vertical");
- rbd.AddForce (horz * speed * Time.fixedDeltaTime,0.0f, vert * speed * Time.fixedDeltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement