playMaker

Author Topic: Force Angle/Rotation  (Read 1724 times)

jrush64

  • Playmaker Newbie
  • *
  • Posts: 20
Force Angle/Rotation
« on: April 17, 2016, 03:16:34 PM »
Hi,

So i have a question. I want my player to enter a collider and only be able to move in 1 axis, lets say the x axis.

Now I can able to use set rotation make the character move in 1 axis but there's no way of setting the movement back to normal.

Basically, I want to force movement in 1 axis, like a 2d plane but then set it back afterwards.

How can I about doing that, please?

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Force Angle/Rotation
« Reply #1 on: April 17, 2016, 04:31:01 PM »
Hi,

I think it may depend on how you move your character already, so it would help if you gave a description or a screenshot of the states youre moving it with now.

Also, maybe im just a noob, but Im having trouble of understanding how you used set rotation to make the player move in one direction. If you explained that as well it would not only teach me something, but may enable me to help you even easier.

jrush64

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Force Angle/Rotation
« Reply #2 on: April 17, 2016, 05:54:42 PM »
Say I'm on a balance beam and i want to only go forward. I want to restrict movement to only forward and back instead of left and right.

Set Rotation forces me to move in only 1 direction but with no way of changing back.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Force Angle/Rotation
« Reply #3 on: April 17, 2016, 07:12:01 PM »
Okay, maybe im tired or something, but I may still not be getting it.

So currently when you move left/right, the character actually moves in that direction or just rotates so that it can move in that direction with the forward/backward key?

If currently the character just rotates then I can understand how set rotation, if done every frame, would make you move in the direction that the rotation is set to and not allow you to rotate to move left and right.

But if that is the case, just use another trigger event at the end of the tightrope and make it leave the state that sets rotation every frame.

Sorry if I am totally off topic and just not getting your issue, but from my understanding set rotation just sets the rotation once, unless done every frame. Also it is my understanding that once you leave a state that contains the set rotatiom action- the action has no way of setting rotation. So following that logic; if set rotation disables left/right as you wanted, then transitioning to a state that has not got a 'set rotation' action would return your character to normal.

Or am I just totally noobing out here?
« Last Edit: April 17, 2016, 07:21:32 PM by Zeldag »

jrush64

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Force Angle/Rotation
« Reply #4 on: April 17, 2016, 08:20:39 PM »
Ok let me explain clearer.

My character moves in full 3d space. I just want the character to move in 2d space when he enters a collider and back to 3d space when he leaves the collider.

@Zeldag, I'll try that now.