I’m learning to use Unity for a college course, and I’ve making a pong game by following a tutorial and then changing it. The thing is we’re learning in Javascript and the code from the tutorial is in C#.
Could anyone help me out either with changing the code to work in Javascript, or adding a variable so that I can change the speed of the ball?
javascript isn’t that different.
for a variable you use var:type name;
in c# type name;
void Start(){
}
function Start(){
}
rigidbody.velocity = Vector3.right;
javascript would be the same.
void Update(){
}
function Update(){
}
Add a little at a time and read the error message.