Hi people! ^_^ In my prototype i'm using battle areas to change scene and teleport to a new battle scene arena... I use a simple teleport event as in tutorial, and camera and controls are blocked. However, in the moment the player is being teleported and the scene is fading, he still moves a bit in the direction he was walking, like sliding on ice... Any suggestion how to prevent this? :)
Hrm, if player control is locked, it should lock the position as well. Are you unblocking the player before the event ends? Are you using the ORK character controller or your own solution?
That may be the issue. DG uses a custom controller as well; and an early problem I had was that the player's velocity/momentum wasn't reset when an event started and the player's position was locked. So after the player became unlocked, they would continue moving in the same direction because the velocity hadn't been set to zero.
What we ended up doing was just creating an easy function in our controller that zero'd out all momentum and velocity once it was called from within ORK.
Of course, that may not be your problem, but it sounded similar to mine. You could also just try setting the player's animation to Idle and put an invisible wall in right behind the scene changer so he doesn't slide.
Thanks for the tips! Your solution seems to fit perfectly what i need... I'm quite unexperienced in scripting-side of ORK, could you suggest me one wait to make controller recognize "battle start event"? I think if i could stop the movement script as soon as the player is summoned to battle, the issue would disappear. Thanks a lot Kirb. :)
The easiest way to do this is by adding OnEnable and OnDisable functions to your component. Since ORK will simply enable/disable a control script when its blocked, those functions will be called and you can do cleanup stuff there (like setting velocity to 0).
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!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
Thanks however! :)
My old entry for Indie Game Making Contest 2015
What we ended up doing was just creating an easy function in our controller that zero'd out all momentum and velocity once it was called from within ORK.
Of course, that may not be your problem, but it sounded similar to mine. You could also just try setting the player's animation to Idle and put an invisible wall in right behind the scene changer so he doesn't slide.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
Thanks a lot Kirb. :)
My old entry for Indie Game Making Contest 2015
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Cheers! :-)
My old entry for Indie Game Making Contest 2015