edited June 2014 in ORK Support
I tried a simple move event where if I press the left shift button, my character will move to the y position by 5. No matter how much I tried, it's not working, but if I set it to move to the z position, it works. Is this intended?
  • Are you making the game in 2d or 3d?
  • edited June 2014
    it's a 3d game, but in the 2d platform perspective. So in this case, the Y position will be going up in the air.
    Post edited by zyzz on
  • Can you post your script? :)
    And did you try to switch y and z?
  • Oh, there's no script involve or anything. It's all in the event system.
    For example. I make an event with interaction type set to Key Press, and in the event itself, I just create a simple event:

    Start - Change Position (to the Y vector)
    And hmm, switch Y and Z, do you mean like put it so that the Z is pointing UP? To be honest, I'm not sure how to do that. Apparently, trying to do it via the scene window isn't the right way.
  • I'm not sure but... Interaction Type can be event, it is not important AFAIK, you should change Start Type (in the first part of event box in inspector): use Key Press start type, and if you want only to activate it in scene every moment, don't use trigger... If you check trigger, i suppose it is only if your player and the object are colliding. In the event just use the Move to Position as you did, or move to direction accordingly to what is most suitable for you. I think it should work that way. :)
  • Are you using a Move Event or a Game Event. If it's a move event, you're using the wrong type of event, those are only used for simple move stuff like animating notifications or idle behaviour during waypoints in move AI.

    In your Change Position step, make sure to disable Apply Gravity when you want to move your object upwards, because that will automatically add Physics.gravity (around Y=-9) to the movement.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Oh, thanks, both of you. I've solved it, thanks to you guys.
    GiL, I assume that when the character is moving up the Y axis, it cannot be interrupted by the player controller, right? Like moving forward or backward while the character is still moving up.
  • If you've blocked the player controls, yes - if not, they will still interfere :)
    In game events, you can either completely block controls during the event, or block them only for parts of the event using the Block Player Control step.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.