def METHOD_NAME(cls, effect, dynamic_type, orientation=0, ttl=-1):
    target = effect.casting_spell.initial_target
    # Target must be a vector.
    if isinstance(target, ObjectManager):
        target = target.location.copy()
    else:
        target = target.get_ray_vector(is_terrain=True)
    if orientation:
        target.set_orientation(orientation)
    effect.casting_spell.dynamic_object = DynamicObjectManager.spawn(effect.casting_spell.spell_caster,
                                                                     target, effect.get_radius(), effect,
                                                                     dynamic_type, ttl=ttl)
    return effect.casting_spell.dynamic_object