Download

Character movement for side scroller

Hello, I’m new to UE4 i’ve use other engines in the past… I’m trying to make a static mesh a movable character for a side scroller game
i’ve never really played with changing characters before on any engine and i’m finding it very hard (i’m sure it’ll be easy)

Anyway!.. I’m trying to make a static mesh move left and right be able to jump and move in the air. Like the HeroTTP character but just as a cube

I’m really stuck and some help would be much appreciated
thank you:)

(Here’s an example of what i’d like it to do)

You could start with the following steps:

  1. Create a blueprint.
  2. Add a static mesh component in the component tab of that blueprint.
  3. Use your static mesh in that static mesh component.
  4. In the Graph tab, in the event graph, add force to your mesh or set its position (starting from EventTick or some other event).

The video tutorials will likely help you starting off.

I’d make the blueprint as a subclass of “Character”, as it carries a lot of movement logic already :slight_smile:

EDIT - I’ve got the character to spawn, physics are on and everything… But i can’t get the cube to move
87cc5cece54e7b01e1e61d2eb29f6e0ede3dc423.jpeg

Could you post a screenshot of what you already did in the char bp? :slight_smile: + also make sure to check the sidescroller template (there you can find all stuff to let your char move)

If this is a C++ project you need to handle the input and then set the X / Y of the “character” depending on if the relevant keys are pressed. If it’s a blueprint one you need to need to handle the movement using blueprint events in the “character”'s blueprint.