Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How would I make a MegaMan 2 Conveyor Belt in C#?

Discussion in 'Scripting' started by AJTheRed, Apr 8, 2016.

  1. AJTheRed

    AJTheRed

    Joined:
    Aug 12, 2015
    Posts:
    2
    I'm currently working on a MegaMan like game, and I am wanting conveyor belts like those in Metal Man's stage, where if the player stands still they move at X speed, if they move with the conveyor belt they move with X speed plus their own speed, and if they move against the conveyor belt they move at their speed minus X speed. However, I'm not sure how to go about creating this, so any and all help is appreciated.

    Thanks in advance
     
    Last edited: Apr 8, 2016
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    how are you doing the character movement? direct position update? physics?
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,181
    If you're using physics, you'll want to check out the Surface Effector, which is designed to be used as a conveyor belt.
     
  4. AJTheRed

    AJTheRed

    Joined:
    Aug 12, 2015
    Posts:
    2
    Thanks for the help! After some slight configuration, my conveyor belt is working just like I wanted it to!