Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Anyone kind enough to help me?

A topic by DoritoThePug created Feb 17, 2020 Views: 474 Replies: 24
Viewing posts 1 to 6

I am just beginning to script (I have intermediate knowledge) and have never made a game. Just wondering if anyone was willing to help me to do so in unity with c#.

Submitted

How?

Submitted

To Help You?

Teach me how to do somethings

I've watched lots of tutorials but they don't really help me as they are just repeating the same things.

Submitted

What do you want to know ??

I've done 3d player movement but can't figure out how to do 2d.

Submitted

What kind of movement?

General movement (jumping, moving etc)

I have watched the brackey's tutorial but it doesn't really make sense, I also can't find out what the unity input system is and how to use it

Also, I don't have enough money to buy a udemy course

Submitted

So you mean platformer movement? I think there is a platformer controller already in Unity if you import the 2D asset pack.

Yes, I have done that but I cannot understand what they are doing.

Submitted

This is a good tutorial for 2D platformer movement.
Submitted

public float runSpeed = 5f; // controls player's speed

private float moveInput; // will tell the computer to move the player later on.

private Rigidbody2D rb; // this will be the rigidbody the forces will be  applied to.

private void Start () {

rb = GetComponent<Rigidbody2D>(); // the game needs to know which object to apply forces to; it won't automatically know it's supposed to move the player

}

private void FixedUpdate()

{

 moveInput = Input.GetAxis("Horizontal"); // Input.GetAxis("Horizontal")  is a shortcut you can use in unity to use the arrow keys/ A&D keys to move forward
  rb.velocity = new Vector2(moveInput * runSpeed, rb.velocity.y); // will cause the rigidbody to move depending on which buttons you press

}

/* This should get your character to move left and right,  but not up/down. If you want them to move freely up and down, write  :

moveInput = Input.GetAxis("Vertical"); right under  moveInput = Input.GetAxis("Horizontal"); . Jumping is a little trickier. 

since you need permission to use other people's work for this jam, I hereby declare that anyone participating in this gamejam can use this comment and it's contents to use in their games for whatever purpose. */

Thank you

Submitted

Did it work the way you wanted it to?

I already had my own script but that help as for declaring the moveVelocity variable you needed a x and y and I couldn't find a solution. So thank you

I still have a problem though, the sprite moves down incredibly slowly (tried to change the gravity), it worked but would not touch the ground

(+1)

what i've done is this but the sprite would not touch the ground for some reason 

also I mean moveInput note velocity on the moveVelocity = new Vector2 (moveVelocity...) I mean (moveInput)

I don't think its because of the script though becuase i tested this on another sprite without the script so any suggestions what went wrong?

The box collider is maybe set too low. Try move it up in the editor without also move the sprite.

Submitted

Do u have Discord. If so feel free to dm me so I can try to help. (@tipu#1178)I have been same situations like u In half year ago so I wanna really give my help. (but still im making my own game so be pacient when u ask something and be ready that I cant do everything. I just do Best as I can okay?)