#How are theese effects made?

1 messages · Page 1 of 1 (latest)

pure pivot
#

Hi there. i wanna do a specific combat system for my game, where before every enemy attack an red cone (or circle) appears in fron of an enemy on the ground, slowly fills red from one side and then the enemy strikes and damages anyone on it. kinda simillar (i mean exactly the same lol) as the ones on the pictures or if you know a mobile game called Last Day On Earth: Survival. It also has these. thx so much. just to clarify, i sort of understand the math on how to determine the angle and distance between two oriented points, but i am lost on the part of drawing that "animated" sprite on the ground. again thx so much.

barren carbon
#

In short, it's a shader

fluid prairie
#

Is hard to tell from the picture, but there are several ways you could go for this:

  1. If is simply that it gets more red, you can use a plane with an animation that adjust the alpha and color.
  • 1.1 If the terrain is irregular, you might want to use a projector.
  1. A shader that adjust the image over a value will give you a nicer effect.

From your description I do not understand where the circle should appear, if is in front of the enemy just calculate the transform.position of the enemy + (enemy.forward*value). It should be a gameobject spawning in your desired position.

pure pivot
#

thank you, the circle should appear on the pos of the enemy (i want to have a fat monster that jumps in the air and "crushes" near surroundings), i belive that i can do that with the description you gave me, thx.
I can not however figure out how should i do it if i only want a red cone to appear if front the enemy (like if he were to hit the ground with a club or a maul)
like how do i adjust the angle of "spread" of the image

fluid prairie
#

Oh, I saw the image again, is hidden by the vegetation. The cone can also be a circle centered to the enemy, you will have to adjust the angle of spread by setting the image type to filled and radial (The fill amount would determine the degrees) you can play with the alpha or size to animate the moment of impact.

How to calculate what is impacted? You have several ways:

  1. A mesh with the shape of a cone, triggers anything on it.
  2. Mutiple Raycasts in the angle of the cone. (A spherecast and later calcultion on the angles of the player could also work)
  3. The enemy keeps a 'record' or the player position, at the moment of impact you will have to calculate if the player was in the area of impact (Eg. Distance from the enemy + current Angle from the enemy)
pure pivot
#

oh, thx so much, i will try that