I’ve been flunging untextured balls around, and when I went to look for some inspiration on how to do projectile effects, what I found was not exactly what I wanted. It seems like people generally just make a few polygons in blender, then scroll handmade textures over them.
Which doesn’t feel right to me, since handcrafted assets surely aren’t going to work well if you need to scale the effect, especially in an asymmetric way?
Another thing is that some seem to be using particle systems with one particle for this. And unless I misunderstand something, that seems like a misuse of the system.
So how, in broad strokes, would you implement effects like a fireball or a lightning bolt?
projectiles tend to use alpha so a handpainted texture is enough. don’t try reinvent the wheel.
I don’t understand what you mean.
a small projectile texture is enough, scaling it works because it’s just a smudge of color and it gets blurred.
for projectiles, use a meshinstance3D. you can set it to orient itself towards the camera for something like a ball of energy, or you can combine multiple flat planes in blender to simulate volume.
for something more complex you CAN fire a particle system, like a sphere of plasma with lighting around it or a fireball.
for a flame thrower, yes, use a particles system and spawn detectors to roughly match the visual part.
for a beam effect there are two ways.
1 - use a whole beam on a plane and scale it. the beam would be scaled to between the caster and the point of contact. this is commonly used for fast lighting effects, and can also be used for lasers.
here’s some edited code from my game that does something similar:
var tmp : MeshInstance3D = BEAM.instantiate()
add_child(tmp)
tmp.global_position = j#the middle point between caster and impact point
var stl : Vector3 = hit_position#point of impact
var scl : Vector3 = Vector3(1.0, 1.0, stl.distance_to(j) * 2.0)#scale of the beam (distance between the caster and objective)
tmp.scale = scl
if not (stl - j).cross(Vector3.UP).is_zero_approx():
tmp.look_at_from_position(j, stl, Vector3.UP)#look_at(stl)
2 - basically the same thing but you scale the UV and move it. this is done to animate lightning when the beam has to be persistent.