I wanted to follow up on my tests. As expected, circles and rectangles/walls do consider their center to be the target location. Cones consider their location to be the midpoint of the back arc (again, as expected).
What was surprising is that bolts do not consider the far point of the bolt to be the target location. Apparently, the target is actually directly in front of the caster--not right on top of the caster, a position slightly in front.
Practically, this information can allow passing the spell the target location it expects. For a cone, I will probably use a circle of approximately the same size*. Since this gives the center of the circle and we want the back edge, we can use the radius of the circle and the vector between the caster and the center to find our new target location.
For a bolt, I will probably use a small circle at the endpoint of the beam, to make it easier for players to aim. Again, we can use the vector between the caster and the target to find the target location that the bolt expects.
(* This may mean overriding spelltarget.2da to include circle diameters that are closer to the cone sizes.)
What script does the spell casting GUI call?
Débuté par
M. Rieder
, déc. 25 2010 01:18
#51
Posté 21 janvier 2011 - 12:44





Retour en haut






