I would like to realize dash in my game. If I press w, the player will move forward. I was considering changing the transform value of the player. However, I wish my player would not pass the wall or something else. I also tried to change the velocity of the player temporarily, which works wired.
So is there any good idea about realizing a dash system in the ECS?
Cast a ray forward of the maximum dash distance and change the player transform to the hit point of the ray cast. You can then use the collision layer to choose what your player can dash through (other player but not walls).
1 Like
Thank you!