playMaker

Author Topic: character controller always move along certain axis? [SOLVED]  (Read 2594 times)

JoshuaShoemaker

  • Playmaker Newbie
  • *
  • Posts: 14
Hello, I am designing a level that requires my character controller to always move along the x axis. How might this be possible?
« Last Edit: July 11, 2014, 12:59:18 PM by JoshuaShoemaker »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: character controller always move along certain axis?
« Reply #1 on: July 09, 2014, 02:05:07 AM »
You should elaborate a little more on your design. Are you using world axis or local axis to translate your character. You have different options to gather player input from different devices. If it's 2d and your using the Global X and Y axis then you can translate your controller strictly along X. If it's 3D but at a certain part of the level you need the player to only move left or right that will depend on how you constrain your player to the camera and manipulate any controller input from that union.

JoshuaShoemaker

  • Playmaker Newbie
  • *
  • Posts: 14
Re: character controller always move along certain axis?
« Reply #2 on: July 09, 2014, 12:24:06 PM »
Sorry for lack of detail and thank you for your response. It is a 2.5d platformer. The level has parts where I am using my normal character control fsms. But at certain points, he enters a tunnel where the player will be constantly sliding through it. The design is to have it play similar to Donkey Kong's mine cart levels.

I need to have the player always moving along the global x-axis in one direction, but I also need to have him be able to jump as well.

I have tried to use "add force" along the x but that didn't turn out too well. And I can not use "move towards" because then jumping and gravity will no longer be actually usable.

I hope this is clear enough.

JoshuaShoemaker

  • Playmaker Newbie
  • *
  • Posts: 14
Re: character controller always move along certain axis?
« Reply #3 on: July 11, 2014, 12:58:25 PM »
I found out a way. I used "Get Vector 3 XYZ" and stored the X position in a float. Then I used "Set Position" (every frame) using that X float variable. Then used "Float Add" by the amount that I wanted to move add and checked "every frame". And since it was very jerky I just bumped up the value and checked "per second".


redikann

  • Full Member
  • ***
  • Posts: 174
Re: character controller always move along certain axis? [SOLVED]
« Reply #4 on: July 11, 2014, 08:21:41 PM »
The Itween actions are very good for smoothly translating objects.