dash till puff game
hey ... i am trying to make dash till puff game just for training .. but i have a problem ..
in the game when i touch the screen i can move up when i release it i can move down ...
i feel no forces when i play it
all i did just it can jump when i press "W" key in that code below ......
using UnityEngine;
using System.Collections;
public class player_control : MonoBehaviour {
Rigidbody2D rb2d;
public float speed = 1.0f;
// Use this for initialization
void Start () {
rb2d = gameObject.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update () {
if(Input.GetKey("w")){
rb2d.velocity = (new Vector2 (0, speed));
}
}
}
i don't want that .... it should fly not jump
and here is all physics i added to the ball
![alt text][1]
so any ideas ?? [1]: /storage/temp/94675-94586-18622667-731325133707587-7077873939249232823.jpg
Your answer
Follow this Question
Related Questions
Having a couple of problems regarding 2D Movement. 1 Answer
I'm working with the corgi-engine/inventory engine and need help with a script. 1 Answer
How do I save data on a webGL version of my game? 0 Answers
Enemy death animation keeps looping (Unity 2D) 1 Answer
Unity jump from one canvas scene to another scene with canvas 2 Answers