Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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?