Using DOTween for a player controller movement?
« on: July 09, 2015, 12:17:53 PM »
I know your product is good for animating objects in a game but I wanted to reconfirm using your product for Character movement.

I have already started using your product to move my enemy character around. I wanted to ask is DOTween an exceptable way to set up the movement of the main Player too vs. using getAxis and traditional transfrom movement scripting. Is it more expensive on the processor or equal to using traditional Unity player controllers scripting.

The reason I am using your product is it seems much more intuitive from a scripting aspect and for myself I have more control over how I want the movements to be structured.

Thanks.

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Using DOTween for a player controller movement?
« Reply #1 on: July 09, 2015, 04:29:04 PM »
Hi,

I actually wouldn't recommend using a tweening approach for the player's movement, since in that case you might want to react to different circumstances (enemies, player input, ambient-modders) every frame, so it's better to control it via custom code that loops at each update.

Cheers,
Daniele

Re: Using DOTween for a player controller movement?
« Reply #2 on: July 09, 2015, 09:46:57 PM »
How about in a simple game such as Q-bert or even Crossy Road. These are basicly grid movements by interger units and the players movent needs to be completed before the next movement is calculated(great for keeping it aligned with the grid). The only reaction in these games is when the player dies. Would DOTween be exceptible in this type of scenario. Your DOJump for example seems like a good reason to use it in a game like Q-bert or Crossy Road. Again for me, probably because I am more on the art side DOTween is more intuitive.

Or would it be better just to play a jump animation along with moving the Players transform.

Thanks for your input.

Re: Using DOTween for a player controller movement?
« Reply #3 on: July 09, 2015, 10:56:11 PM »
I am currently working on a Crossy Road Clone unsing DOTween. I did not like to set up animations for Jumping etc. and then triggering them. So far I am very happy with my solution. the only thing I had to optimize is collisions. I setup the Player-Collider as a trigger. When triggering a collision with certain tagged objects I kill the tween and start a new one which goes back to the last known position.

I think it works very well for tile-base movements.

Best regards
habsi

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Using DOTween for a player controller movement?
« Reply #4 on: July 10, 2015, 12:24:57 AM »
I totally agree with habsi70. In case of tile movement everything I said in my previous post is invalid, and DOTween would work greatly :)