Continuous Character Movement 2D

Updated on February 14, 2018 in [A] 2D
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
4 on February 11, 2018

I Am A Very Beginner Coder And I Was Wondering If Someone Could Help Me Create A Script That Makes Your Character Move Continuously In The Y Axis

  • Liked by
Reply
3 on February 11, 2018
transform.Translate(Vector3.up * (Time.deltaTime * 10));

Put this in your character’s update loop. You can change the speed by increasing/decreasing the “X” in (Time.deltaTime * X)

on February 11, 2018

where is my characters update loop

BTW i’m sorry it seems like your working with a five year old.

Wise
on February 12, 2018

No problem. You’ll probably want this in a fresh script any way. Just make a new script, and it should already have a function called “Update”. Drop that line in it, and drag and drop the script onto the character.

 

on February 14, 2018

Thank you so much for helping me even though it kind of seemed hopeless

thank you ever so much 🙂

Show more replies
  • Liked by
Reply
Cancel