playMaker

Author Topic: (SOLVED) Dashing Effect - Player Dash  (Read 1584 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
(SOLVED) Dashing Effect - Player Dash
« on: October 07, 2018, 06:18:33 AM »
Hi !

Let's say cube is moving on platform via Dotween move function.
When hit a key, cube should dash. It's should move 2 in X axis in x2 speed.

How to do it?
« Last Edit: October 10, 2018, 03:00:05 AM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Dashing Effect
« Reply #1 on: October 07, 2018, 08:29:16 AM »
Hi.
Probably have a state with a 2nd dotween move and trigger it when a key was hit.
if you have the move speed in a variable you can use a float operator and multiply by 2 then use the result variable on the 2nd dotween

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Dashing Effect
« Reply #2 on: October 10, 2018, 12:15:39 AM »
Hi.
Probably have a state with a 2nd dotween move and trigger it when a key was hit.
if you have the move speed in a variable you can use a float operator and multiply by 2 then use the result variable on the 2nd dotween
Sorry for the delayed update.
I tried something and it went wrong.

Pls check here :  (59 Secs)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: (Unsolved) Dashing Effect
« Reply #3 on: October 10, 2018, 02:59:41 AM »
Yay !

Finally did it with simple actions. I have no idea how I missed this. hours of struggle came to an end.

Here is how I did it (40 secs)  >> 8) 8)

Btw, I tried floate multiply / set float in state 2 to do that. I have no idea why it never worked. I would appericiate if someone pointed out the issue.

Anyway, It is working now. Can use SET TAG action to make enemy destroy  :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: (SOLVED) Dashing Effect - Player Dash
« Reply #4 on: October 10, 2018, 04:49:52 AM »
Hi.
Looks good :)

But i would do the physics and controls in 2 different fsm's and use set fsm float to set the speed.

Especially if would be planning to add jump and maybe some other things later