Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Which method will be the better way to realize dash in a 2d game?

Discussion in 'Physics for ECS' started by iamshenkui_gee, Jul 20, 2022.

  1. iamshenkui_gee


    Apr 24, 2021
    Hi, I am trying to create a 2d roguelike game, and I would like to realize a dash system. But I am not sure how I can realize that would be better.
    I have several ideas about this function:
    a) I can use ray cast to detect whether there is some stuff in the direction. And change the translation of the entity to the longest distance in the direction or the location in front of the collider position.
    b) I can just add force in the direction.
    c) I can give some extra speed on the direction, which is more like a quicker running system rather than a dash system.
    I also noticed that some people in the past posted a dash system based on IJobChunk, which I am not sure how to realize.
    Can anyone give me some suggestions about the dash system?