playMaker

Author Topic: Move By - Itween - Inconsistent  (Read 504 times)

kavery

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Move By - Itween - Inconsistent
« on: July 23, 2018, 10:40:08 AM »
I have many situations where 'move by' is totally reliable. But there's one state where it fails 5% of the time. The other actions in the state still fire. Best guess is another GO somewhere is instructing movement, preventing the itween even though I can't imagine where this is happening.

Is there a way to clear a game object of any current itween transforms going on anywhere just before enacting a new one?   
« Last Edit: July 23, 2018, 11:27:16 AM by kavery »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4106
    • View Profile
    • jinxtergames
Re: Move By - Itween - Inconsistent
« Reply #1 on: July 24, 2018, 01:17:10 AM »
Hi.
Can you give some more information?
Its hard to guess what the issue.

Maybe you can use a global transition (event) to stop the tween?

kavery

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Re: Move By - Itween - Inconsistent
« Reply #2 on: July 25, 2018, 07:16:35 AM »
Well it's fight mechanic stuff, ie when an enemy collider detects a players attack collider (punch, kick, jumpkick etc) the enemy fsm enters the appropriate state, plays an animation and performs a 'move to' action for knocked back movements. I have many interactions like this but for some reason one particular state fails the 'move to' 5% of the time.

The states change really fast, normally I can pause and pinpoint the problem but not this one. It's one of the final bugs on a 2 year project. It would be nice if I could just call off/detach any currently applied itweens before a new itween. 

 
« Last Edit: July 25, 2018, 07:34:58 AM by kavery »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4106
    • View Profile
    • jinxtergames
Re: Move By - Itween - Inconsistent
« Reply #3 on: July 25, 2018, 07:48:28 AM »
Hi.
Have you tried using break points to find the issue?


You can skip to about 5min into the video if you want.

kavery

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Re: Move By - Itween - Inconsistent
« Reply #4 on: July 25, 2018, 08:44:10 AM »
Great idea.. I just recently learned about that. BTW was there supposed to be a video link here?

kavery

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Re: Move By - Itween - Inconsistent
« Reply #5 on: July 25, 2018, 10:13:41 AM »
I think the problem comes from an outside GO, instructing the problem GO to move via itween. So I'm not sure if break point would reveal who that is. Ultimately I'll have to figure out another method I guess. 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4106
    • View Profile
    • jinxtergames
Re: Move By - Itween - Inconsistent
« Reply #6 on: July 25, 2018, 04:55:07 PM »
Hi,
Itween is outdated, maybe try dotween.

Also if you could show the fsm/states/action maybe i can see whats going on best is in a video that shows the issue also.